- if (curve.m_iLineStyle != SGP::LS_NOLINE) {
- rSGP.setLineStyle (curve.m_iLineStyle);
- double x = convertWorldToNDC_X (curve.x[0]);
- double y = convertWorldToNDC_Y (curve.y[0]);
- rSGP.moveAbs (x, y);
- for (int i = 1; i < curve.m_iPointCount; i++) {
- x = convertWorldToNDC_X (curve.x[i]);
- y = convertWorldToNDC_Y (curve.y[i]);
- rSGP.lineAbs (x, y);
- }
- }
- if (curve.m_iSymbol > 0) {
- rSGP.setLineStyle (SGP::LS_SOLID);
- double x = convertWorldToNDC_X (curve.x[0]);
- double y = convertWorldToNDC_Y (curve.y[0]);
- rSGP.moveAbs (x, y);
- symbol (curve.m_iSymbol, symwidth, symheight);
- for (int i = 1; i < curve.m_iPointCount; i++)
- if (i % curve.m_iSymbolFreq == 0 || i == curve.m_iPointCount - 1) {
- x = convertWorldToNDC_X (curve.x[i]);
- y = convertWorldToNDC_Y (curve.y[i]);
- rSGP.moveAbs (x, y);
- symbol (curve.m_iSymbol, symwidth, symheight);
- }
- }
+ for (EZPlotCurveIterator iterCurve3 = m_vecCurves.begin(); iterCurve3 != m_vecCurves.end(); iterCurve3++) {
+ const EZPlotCurve& curve = **iterCurve3;
+
+ rSGP.setColor (curve.m_iColor);
+ \r
+ bool bOutside = false;
+ if (curve.m_iLineStyle != SGP::LS_NOLINE) {
+ rSGP.setLineStyle (curve.m_iLineStyle);
+ double x1 = convertWorldToNDC_X (curve.x[0]);
+ double y1 = convertWorldToNDC_Y (curve.y[0]);\r
+ for (int i = 1; i < curve.m_iPointCount; i++) {
+ double x2 = convertWorldToNDC_X (curve.x[i]);
+ double y2 = convertWorldToNDC_Y (curve.y[i]);\r
+ double x2Clip = x2;\r
+ double y2Clip = y2;\r
+ if (clip_rect (x1, y1, x2Clip, y2Clip, clipRect)) {\r
+ rSGP.moveAbs (x1, y1);\r
+ rSGP.lineAbs (x2Clip, y2Clip);\r
+ }\r
+ x1 = x2;\r
+ y1 = y2;\r
+ }
+ }
+ if (curve.m_iSymbol > 0) {
+ rSGP.setLineStyle (SGP::LS_SOLID);
+ double x = convertWorldToNDC_X (curve.x[0]);
+ double y = convertWorldToNDC_Y (curve.y[0]);
+ rSGP.moveAbs (x, y);
+ symbol (curve.m_iSymbol, symwidth, symheight);
+ for (int i = 1; i < curve.m_iPointCount; i++)
+ if (i % curve.m_iSymbolFreq == 0 || i == curve.m_iPointCount - 1) {
+ x = convertWorldToNDC_X (curve.x[i]);
+ y = convertWorldToNDC_Y (curve.y[i]);\r
+ if (y >= ygn_min && y <= ygn_max) {
+ rSGP.moveAbs (x, y);
+ symbol (curve.m_iSymbol, symwidth, symheight);\r
+ }
+ }
+ }