Engauge Digitizer 2
|
Go to the source code of this file.
Functions | |
double | angleBetweenVectors (const QPointF &v1, const QPointF &v2) |
Angle between two vectors. Direction is unimportant, so result is between 0 to pi radians. | |
double | angleFromVectorToVector (const QPointF &vFrom, const QPointF &vTo) |
Angle between two vectors. Direction is positive when rotation is about +z vector, so result is betwen -pi to pi radians. | |
void | ellipseFromParallelogram (double xTL, double yTL, double xTR, double yTR, double xBR, double yBR, double &angleRadians, double &aAligned, double &bAligned) |
Calculate ellipse parameters that is incribed in a parallelogram centered at the origin, given three successive corners of that parallelogram. | |
QRgb | pixelRGB (const QImage &image, int x, int y) |
Get pixel method for any bit depth. | |
QRgb | pixelRGB1 (const QImage &image1Bit, int x, int y) |
Get pixel method for one bit depth. | |
QRgb | pixelRGB8 (const QImage &image8Bit, int x, int y) |
Get pixel method for 8 bit depth. | |
QRgb | pixelRGB32 (const QImage &image32Bit, int x, int y) |
Get pixel method for 32 bit depth. | |
void | projectPointOntoLine (double xToProject, double yToProject, double xStart, double yStart, double xStop, double yStop, double *xProjection, double *yProjection, double *projectedDistanceOutsideLine, double *distanceToLine) |
Find the projection of a point onto a line segment such that the line through the point and its projection are normal to the original line, subject to one constraint. | |
void | setPixelRGB (QImage &image, int x, int y, QRgb q) |
Set pixel method for any bit depth. | |
void | setPixelRGB1 (QImage &image1Bit, int x, int y, QRgb q) |
Set pixel method for one bit depth. | |
void | setPixelRGB8 (QImage &image8Bit, int x, int y, QRgb q) |
Set pixel method for 8 bit depth. | |
void | setPixelRGB32 (QImage &image32Bit, int x, int y, QRgb q) |
Set pixel method for 32 bit depth. | |
Variables | |
const double | PI = 3.1415926535 |
Angle between two vectors. Direction is unimportant, so result is between 0 to pi radians.
Definition at line 15 of file mmsubs.cpp.
Angle between two vectors. Direction is positive when rotation is about +z vector, so result is betwen -pi to pi radians.
Definition at line 32 of file mmsubs.cpp.
void ellipseFromParallelogram | ( | double | xTL, |
double | yTL, | ||
double | xTR, | ||
double | yTR, | ||
double | xBR, | ||
double | yBR, | ||
double & | angleRadians, | ||
double & | aAligned, | ||
double & | bAligned ) |
Calculate ellipse parameters that is incribed in a parallelogram centered at the origin, given three successive corners of that parallelogram.
By symmetry the other corner is not needed.
Definition at line 52 of file mmsubs.cpp.
Get pixel method for any bit depth.
Definition at line 169 of file mmsubs.cpp.
Get pixel method for one bit depth.
Definition at line 182 of file mmsubs.cpp.
Get pixel method for 32 bit depth.
Definition at line 201 of file mmsubs.cpp.
void projectPointOntoLine | ( | double | xToProject, |
double | yToProject, | ||
double | xStart, | ||
double | yStart, | ||
double | xStop, | ||
double | yStop, | ||
double * | xProjection, | ||
double * | yProjection, | ||
double * | projectedDistanceOutsideLine, | ||
double * | distanceToLine ) |
Find the projection of a point onto a line segment such that the line through the point and its projection are normal to the original line, subject to one constraint.
The constraint is that if the project point is outside the (xStart,yStart) to (xStop,yStop) line segment then it will be moved to (xStart,yStart) or (xStop,yStop), whichever is closer.
xToProject | X/theta coordinate to project |
yToProject | Y/radius coordinate to project |
xStart | X/theta at start |
yStart | Y/radius at start |
xStop | X/theta at end |
yStop | Y/radius at end |
xProjection | X/theta coordinate of point projected onto line, moved to between start and end points if outside |
yProjection | Y/radius coordinate of point projected onto line, moved to between start and end points if outside |
projectedDistanceOutsideLine | Specifies how far the projected point was moved because of this constraint - zero if it was not moved or greater than zero if it was moved. |
distanceToLine | Distance between point and close point on the line segment |
Definition at line 211 of file mmsubs.cpp.
Set pixel method for any bit depth.
Definition at line 281 of file mmsubs.cpp.
Set pixel method for one bit depth.
Definition at line 297 of file mmsubs.cpp.
Set pixel method for 32 bit depth.
Definition at line 330 of file mmsubs.cpp.
Definition at line 13 of file mmsubs.cpp.