13const double PI = 3.1415926535;
165 angleRadians = 0.5 *
qAtan (2 *
C / (
A -
B));
171 switch (image.depth())
185 if (
image1Bit.format () == QImage::Format_MonoLSB) {
186 bit = *(
image1Bit.scanLine (y) + (x >> 3)) & (1 << (x & 7));
188 bit = *(
image1Bit.scanLine (y) + (x >> 3)) & (1 << (7 - (x & 7)));
283 switch (image.depth())
299 for (
int index = 0; index <
image1Bit.colorCount(); index++) {
302 if (
image1Bit.format () == QImage::Format_MonoLSB)
304 *(
image1Bit.scanLine (y) + (x >> 3)) &= ~(1 << (x & 7));
306 *(
image1Bit.scanLine (y) + (x >> 3)) |= index << (x & 7);
310 *(
image1Bit.scanLine (y) + (x >> 3)) &= ~(1 << (7 - (x & 7)));
312 *(
image1Bit.scanLine (y) + (x >> 3)) |= index << (7 - (x & 7));
321 for (
int index = 0; index <
image8Bit.colorCount(); index++) {
const int INNER_RADIUS_MIN
QRgb pixelRGB8(const QImage &image8Bit, int x, int y)
Get pixel method for 8 bit depth.
double angleFromVectorToVector(const QPointF &vFrom, const QPointF &vTo)
Angle between two vectors. Direction is positive when rotation is about +z vector,...
QRgb pixelRGB32(const QImage &image32Bit, int x, int y)
Get pixel method for 32 bit depth.
QRgb pixelRGB(const QImage &image, int x, int y)
Get pixel method for any bit depth.
void setPixelRGB8(QImage &image8Bit, int x, int y, QRgb q)
Set pixel method for 8 bit depth.
double angleBetweenVectors(const QPointF &v1, const QPointF &v2)
Angle between two vectors. Direction is unimportant, so result is between 0 to pi radians.
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 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 proje...
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,...
QRgb pixelRGB1(const QImage &image1Bit, int x, int y)
Get pixel method for one bit depth.
void setPixelRGB32(QImage &image32Bit, int x, int y, QRgb q)
Set pixel method for 32 bit depth.