return aMinX;
}
+/*!
+ Gets curve's maxiaml abscissa
+*/
+double Plot2d_Curve::getMaxX() const
+{
+ QValueList<Plot2d_Point>::const_iterator aIt;
+ double aMaxX = -1e150;
+ int aCurrent = 0;
+ for(aIt = myPoints.begin(); aIt != myPoints.end(); ++aIt) {
+ if ( (*aIt).x > aMaxX )
+ aMaxX = (*aIt).x;
+ }
+ return aMaxX;
+}
+
/*!
Gets curve's minimal ordinate
*/
return aMinY;
}
+/*!
+ Gets curve's maximal ordinate
+*/
+double Plot2d_Curve::getMaxY() const
+{
+ QValueList<Plot2d_Point>::const_iterator aIt;
+ double aMaxY = -1e150;
+ int aCurrent = 0;
+ for(aIt = myPoints.begin(); aIt != myPoints.end(); ++aIt) {
+ if ( (*aIt).y > aMaxY )
+ aMaxY = (*aIt).y;
+ }
+ return aMaxY;
+}
+
/*!
Changes text assigned to point of curve
\param ind -- index of point
// non-positive X/Y coordinate
double getMinX() const;
double getMinY() const;
+ // Protection against QwtCurve::drawLines() bug in Qwt 0.4.x:
+ // sometimes it crashes (FPE) if draws curve with big abciss or ordinate cooridates
+ // after curve with small values
+ double getMaxX() const;
+ double getMaxY() const;
+
protected:
bool myAutoAssign;