public static Point ScalePointF(PointF Pos, Viewer.viewData data) { var l = ((Pos.X * data.Scale) * data.ZoomLevel) - data.PanPosition.X; var t = ((Pos.Y * data.Scale) * data.ZoomLevel) - data.PanPosition.Y; return(new Point((int)l, (int)t)); }
public void Draw(Viewer.viewData data) { var out_rectangle = ViewerHelper.ScaleRectangle(_x, _y, _s, _s, data); data.OutputGraphic.DrawLine(_color, out_rectangle.X - out_rectangle.Width, out_rectangle.Y, out_rectangle.Right, out_rectangle.Y); data.OutputGraphic.DrawLine(_color, out_rectangle.X, out_rectangle.Y - out_rectangle.Height, out_rectangle.X, out_rectangle.Bottom); }
public static Point ScalePoint(float X, float Y, Viewer.viewData data) { var l = ((X * data.Scale) * data.ZoomLevel) - data.PanPosition.X; var t = ((Y * data.Scale) * data.ZoomLevel) - data.PanPosition.Y; return(new Point((int)l, (int)t)); }
public void Draw(Viewer.viewData data) { var out_rectangle = ViewerHelper.ScaleRectangle(_x, _y, _w, _h, data); data.OutputGraphic.DrawRectangle(_color, out_rectangle); data.OutputGraphic.FillRectangle(_fill, out_rectangle); }
public void Draw(Viewer.viewData data) { var out_from = ViewerHelper.ScalePoint(_fx, _fy, data); var out_to = ViewerHelper.ScalePoint(_tx, _ty, data); data.OutputGraphic.DrawLine(_color, out_from, out_to); }
public void Draw(Viewer.viewData data) { var out_rectangle = ViewerHelper.ScaleRectangle(_x, _y, data.Size.X, data.Size.Y, data); data.OutputGraphic.DrawLine(_color, out_rectangle.X, 0, out_rectangle.X, out_rectangle.Height); data.OutputGraphic.DrawLine(_color, 0, out_rectangle.Y, out_rectangle.Width, out_rectangle.Y); }
public static Rectangle ScaleRectangle(float X, float Y, float W, float H, Viewer.viewData data) { var l = ((X * data.Scale) * data.ZoomLevel) - data.PanPosition.X; var t = ((Y * data.Scale) * data.ZoomLevel) - data.PanPosition.Y; var w = (W * data.Scale) * data.ZoomLevel; var h = (H * data.Scale) * data.ZoomLevel; return(new Rectangle((int)l, (int)t, (int)w, (int)h)); }
public void Draw(Viewer.viewData data) { var out_pos = ViewerHelper.ScaleRectangle(_pos.X - _radius, _pos.Y - _radius, _diameter, _diameter, data); data.OutputGraphic.DrawEllipse(_color, out_pos); }