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