Engauge Digitizer  2
CallbackUpdateTransform.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 "CallbackUpdateTransform.h"
8 #include "Point.h"
9 
11  DocumentAxesPointsRequired documentAxesPointsRequired) :
12  CallbackAxisPointsAbstract (modelCoords,
13  documentAxesPointsRequired)
14 {
15 }
16 
18 {
19  if (documentAxesPointsRequired () == DOCUMENT_AXES_POINTS_REQUIRED_3) {
20  return !isError () && (numberAxisPoints () == 3);
21  } else {
22  return !isError () && (numberAxisPoints () == 4);
23  }
24 }
DocumentAxesPointsRequired documentAxesPointsRequired() const
Number of axes points required for the transformation.
bool transformIsDefined() const
True if enough Points were available to create a Transformation.
CallbackUpdateTransform(const DocumentModelCoords &modelCoords, DocumentAxesPointsRequired documentAxesPointsRequired)
Single constructor.
Model for DlgSettingsCoords and CmdSettingsCoords.
bool isError() const
This value is checked after iterating to see if the axis data is correct.
unsigned int numberAxisPoints() const
Number of axis points which is less than 3 if the axes curve is incomplete.
Callback for collecting axis points and then performing common calculations on those axis points...