17 m_documentAxesPointsRequired (documentAxesPointsRequired),
18 m_isEmptyGraphX (true),
19 m_isEmptyGraphY (true),
20 m_isEmptyScreenX (true),
21 m_isEmptyScreenY (true),
22 m_transformation (transformation)
29 isEmpty = m_isEmptyGraphX || m_isEmptyGraphY;
31 return m_boundingRectGraphMax;
37 isEmpty = m_isEmptyGraphX || m_isEmptyGraphY;
39 return m_boundingRectGraphMin;
45 isEmpty = m_isEmptyScreenX || m_isEmptyScreenY;
47 return QRectF (m_boundingRectScreenMin,
48 m_boundingRectScreenMax).normalized();
55 bool haveGraphX =
true, haveGraphY =
true;
68 mergeCoordinateX (posGraph,
69 m_boundingRectGraphMin,
70 m_boundingRectGraphMax,
74 mergeCoordinateY (posGraph,
75 m_boundingRectGraphMin,
76 m_boundingRectGraphMax,
80 m_boundingRectScreenMin,
81 m_boundingRectScreenMax,
84 m_boundingRectScreenMin,
85 m_boundingRectScreenMax,
91 void CallbackBoundingRects::mergeCoordinateX (
const QPointF &pos,
92 QPointF &boundingRectMin,
93 QPointF &boundingRectMax,
96 bool newGraphMin = isEmpty;
97 bool newGraphMax = isEmpty;
100 newGraphMin = (pos.x() < boundingRectMin.x());
103 newGraphMax = (boundingRectMax.x() < pos.x());
107 boundingRectMin.setX (pos.x());
110 boundingRectMax.setX (pos.x());
116 void CallbackBoundingRects::mergeCoordinateY (
const QPointF &pos,
117 QPointF &boundingRectMin,
118 QPointF &boundingRectMax,
121 bool newGraphMin = isEmpty;
122 bool newGraphMax = isEmpty;
125 newGraphMin = (pos.y() < boundingRectMin.y());
128 newGraphMax = (boundingRectMax.y() < pos.y());
132 boundingRectMin.setY (pos.y());
135 boundingRectMax.setY (pos.y());