Beispiel #1
0
 public PlotExtristics(PlotSize framePixelSize, PlotPoint frameCenter, float multiplierX = 1, float multiplierY = 1)
 {
     this.framePixelSize = framePixelSize;
     this.frameCenter    = frameCenter;
     this.multiplierX    = multiplierX;
     this.multiplierY    = multiplierY;
 }
Beispiel #2
0
 public AxisMathModel(PlotPoint x_Begin, PlotPoint x_End, PlotPoint y_Begin, PlotPoint y_End)
 {
     this.X_Begin = x_Begin;
     this.X_End   = x_End;
     this.Y_Begin = y_Begin;
     this.Y_End   = y_End;
 }
Beispiel #3
0
 public PlotPoint ProjectModelToPlotPoint(PlotPoint model)
 {
     return(new PlotPoint()
     {
         X = model.X / extristics.MultiplierX - extristics.Center.X,
         Y = model.Y / extristics.MultiplierY + extristics.Center.Y,
     });
 }
Beispiel #4
0
 //TODO: Maybe intristics will do that?
 public PlotPoint ProjectPLotPointToModel(PlotPoint plotPoint)
 {
     return(new PlotPoint()
     {
         X = extristics.Center.X + plotPoint.X * extristics.MultiplierX,
         Y = extristics.Center.Y - plotPoint.Y * extristics.MultiplierY
     });
 }
Beispiel #5
0
 public bool Contains(PlotPoint point)
 {
     if (point.X < MinX || point.X > MaxX)
     {
         return(false);
     }
     if (point.Y < MinY || point.Y > MaxY)
     {
         return(false);
     }
     return(true);
 }
Beispiel #6
0
        public AxisMathModel CreateModel(PlotToModelProjector projector)
        {
            var modelCenter   = projector.ProjectPLotPointToModel(new PlotPoint(0, 0));
            var maxModelPoint = projector.GetMaxModelPoint();

            var xBegin = new PlotPoint(0, modelCenter.Y);
            var yBegin = new PlotPoint(modelCenter.Y, 0);
            var xEnd   = new PlotPoint(maxModelPoint.X, modelCenter.Y);
            var yEnd   = new PlotPoint(modelCenter.X, maxModelPoint.Y);

            return(new AxisMathModel(xBegin, xEnd, yBegin, yEnd));
        }
Beispiel #7
0
        public PlotIntristics(float stepX, float stepY, float multiplierX, float multiplierY, PlotPoint center = default(PlotPoint))
        {
            ///this.Center = center;
            this.StepX = stepX;
            this.StepY = stepY;

            this.MultiplierX = multiplierX;
            this.MultiplierY = multiplierY;
        }