Engauge Digitizer 2
Loading...
Searching...
No Matches
mmsubs.h
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef MM_SUBS_H
8#define MM_SUBS_H
9
10#include <QRgb>
11
12class QImage;
13class QPointF;
14
16extern double angleBetweenVectors (const QPointF &v1,
17 const QPointF &v2);
18
20extern double angleFromVectorToVector (const QPointF &vFrom,
21 const QPointF &vTo);
22
24extern QRgb pixelRGB (const QImage &image, int x, int y);
25
27extern QRgb pixelRGB1 (const QImage &image1Bit, int x, int y);
28
30extern QRgb pixelRGB8 (const QImage &image8Bit, int x, int y);
31
33extern QRgb pixelRGB32 (const QImage &image32Bit, int x, int y);
34
49extern void projectPointOntoLine(double xToProject,
50 double yToProject,
51 double xStart,
52 double yStart,
53 double xStop,
54 double yStop,
55 double *xProjection,
56 double *yProjection,
57 double *projectedDistanceOutsideLine,
58 double *distanceToLine);
59
61extern void setPixelRGB (QImage &image, int x, int y, QRgb q);
62
64extern void setPixelRGB1 (QImage &image1Bit, int x, int y, QRgb q);
65
67extern void setPixelRGB8 (QImage &image8Bit, int x, int y, QRgb q);
68
70extern void setPixelRGB32 (QImage &image32Bit, int x, int y, QRgb q);
71
72#endif // MM_SUBS_H