Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Point
PointMatchPixel.cpp
Go to the documentation of this file.
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
#include "
PointMatchPixel.h
"
8
9
PointMatchPixel::PointMatchPixel
(
int
xOffset
,
10
int
yOffset
,
11
bool
pixelIsOn
) :
12
m_posOffset (
xOffset
,
yOffset
),
13
m_pixelIsOn (
pixelIsOn
)
14
{
15
}
16
17
PointMatchPixel::PointMatchPixel
(
const
PointMatchPixel
&other) :
18
m_posOffset (other.
xOffset
(),
19
other.
yOffset
()),
20
m_pixelIsOn (other.
pixelIsOn
())
21
{
22
}
23
24
PointMatchPixel
&
PointMatchPixel::operator=
(
const
PointMatchPixel
&other)
25
{
26
m_posOffset = QPoint (other.
xOffset
(),
27
other.
yOffset
());
28
m_pixelIsOn = other.
pixelIsOn
();
29
30
return
*
this
;
31
}
32
33
bool
PointMatchPixel::pixelIsOn
()
const
34
{
35
return
m_pixelIsOn;
36
}
37
38
int
PointMatchPixel::xOffset
()
const
39
{
40
return
m_posOffset.x();
41
}
42
43
int
PointMatchPixel::yOffset
()
const
44
{
45
return
m_posOffset.y();
46
}
PointMatchPixel.h
PointMatchPixel::PointMatchPixel
PointMatchPixel(int xOffset, int yOffset, bool pixelIsOn)
Single basic constructor.
Definition
PointMatchPixel.cpp:9
PointMatchPixel::yOffset
int yOffset() const
Y position relative to the center of the point.
Definition
PointMatchPixel.cpp:43
PointMatchPixel::operator=
PointMatchPixel & operator=(const PointMatchPixel &other)
Assignment operator.
Definition
PointMatchPixel.cpp:24
PointMatchPixel::pixelIsOn
bool pixelIsOn() const
True/false if pixel is on/off.
Definition
PointMatchPixel.cpp:33
PointMatchPixel::xOffset
int xOffset() const
X position relative to the center of the point.
Definition
PointMatchPixel.cpp:38
Generated on
for Engauge Digitizer by
1.17.0