// add axis or curve point, depending on state. axis point graph coordinates are set later by // setAxisPoint so user can see where the new axis point lies while editing the graph coordinatees public NuGenPoint AddPoint(int xScreen, int yScreen, NuGenPointSet destination) { double xThetaGraph = 0.0, yRGraph = 0.0; NuGenPoint p; if ((digitizeState == DigitizeState.CurveState) || (digitizeState == DigitizeState.MeasureState)) { ScreenToXThetaYR(xScreen, yScreen, out xThetaGraph, out yRGraph); p = new NuGenPoint(xScreen, yScreen, xThetaGraph, yRGraph); } else { p = new NuGenPoint(xScreen, yScreen); } switch (digitizeState) { case DigitizeState.AxisState: dirtyAxesTransformation = true; pointSets.AddPointAxes(p); break; case DigitizeState.CurveState: case DigitizeState.SegmentState: pointSets.AddPointCurve(p, currentCurveName); break; case DigitizeState.MeasureState: pointSets.AddPointMeasure(p, currentMeasureName); break; case DigitizeState.ScaleState: dirtyScaleTransformation = true; pointSets.AddPointScale(p); break; case DigitizeState.SelectState: //Could be any type of point, so decide if (destination != null) { destination.AddPoint(p); } break; } PointSets.UpdateGraphCoordinates(coordSettings, transform); return(p); }
public void UpdateGraphCoordinates() { PointSets.UpdateGraphCoordinates(coordSettings, transform); }