Engauge Digitizer  2
PointMatchPixel.cpp
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 
10  int yOffset,
11  bool pixelIsOn) :
12  m_posOffset (xOffset, yOffset),
13  m_pixelIsOn (pixelIsOn)
14 {
15 }
16 
18  m_posOffset (other.xOffset(),
19  other.yOffset()),
20  m_pixelIsOn (other.pixelIsOn ())
21 {
22 }
23 
25 {
26  m_posOffset = QPoint (other.xOffset(),
27  other.yOffset());
28  m_pixelIsOn = other.pixelIsOn();
29 
30  return *this;
31 }
32 
34 {
35  return m_pixelIsOn;
36 }
37 
39 {
40  return m_posOffset.x();
41 }
42 
44 {
45  return m_posOffset.y();
46 }
int xOffset() const
X position relative to the center of the point.
Single on or off pixel out of the pixels that define the point match mode's candidate point...
int yOffset() const
Y position relative to the center of the point.
PointMatchPixel(int xOffset, int yOffset, bool pixelIsOn)
Single basic constructor.
bool pixelIsOn() const
True/false if pixel is on/off.
PointMatchPixel & operator=(const PointMatchPixel &other)
Assignment operator.