00001
00002
00003
00004
00005
00006
00007 #ifndef MM_SUBS_H
00008 #define MM_SUBS_H
00009
00010 #include <QRgb>
00011
00012 class QImage;
00013 class QPointF;
00014
00016 extern double angleBetweenVectors (const QPointF &v1,
00017 const QPointF &v2);
00018
00020 extern double angleFromVectorToVector (const QPointF &vFrom,
00021 const QPointF &vTo);
00022
00024 extern QRgb pixelRGB (const QImage &image, int x, int y);
00025
00027 extern QRgb pixelRGB1 (const QImage &image1Bit, int x, int y);
00028
00030 extern QRgb pixelRGB8 (const QImage &image8Bit, int x, int y);
00031
00033 extern QRgb pixelRGB32 (const QImage &image32Bit, int x, int y);
00034
00049 extern void projectPointOntoLine(double xToProject,
00050 double yToProject,
00051 double xStart,
00052 double yStart,
00053 double xStop,
00054 double yStop,
00055 double *xProjection,
00056 double *yProjection,
00057 double *projectedDistanceOutsideLine,
00058 double *distanceToLine);
00059
00061 extern void setPixelRGB (QImage &image, int x, int y, QRgb q);
00062
00064 extern void setPixelRGB1 (QImage &image1Bit, int x, int y, QRgb q);
00065
00067 extern void setPixelRGB8 (QImage &image8Bit, int x, int y, QRgb q);
00068
00070 extern void setPixelRGB32 (QImage &image32Bit, int x, int y, QRgb q);
00071
00072 #endif // MM_SUBS_H