00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #include "PointMatchPixel.h" 00008 00009 PointMatchPixel::PointMatchPixel (int xOffset, 00010 int yOffset, 00011 bool pixelIsOn) : 00012 m_posOffset (xOffset, yOffset), 00013 m_pixelIsOn (pixelIsOn) 00014 { 00015 } 00016 00017 PointMatchPixel::PointMatchPixel (const PointMatchPixel &other) : 00018 m_posOffset (other.xOffset(), 00019 other.yOffset()), 00020 m_pixelIsOn (other.pixelIsOn ()) 00021 { 00022 } 00023 00024 PointMatchPixel &PointMatchPixel::operator= (const PointMatchPixel &other) 00025 { 00026 m_posOffset = QPoint (other.xOffset(), 00027 other.yOffset()); 00028 m_pixelIsOn = other.pixelIsOn(); 00029 00030 return *this; 00031 } 00032 00033 bool PointMatchPixel::pixelIsOn () const 00034 { 00035 return m_pixelIsOn; 00036 } 00037 00038 int PointMatchPixel::xOffset () const 00039 { 00040 return m_posOffset.x(); 00041 } 00042 00043 int PointMatchPixel::yOffset () const 00044 { 00045 return m_posOffset.y(); 00046 }