public override void DrawPath(RPen pen, RGraphicsPath path) { _g.DrawGeometry(null, ((PenAdapter)pen).CreatePen(), ((GraphicsPathAdapter)path).GetClosedGeometry()); }
public override void DrawLine(RPen pen, double x1, double y1, double x2, double y2) { x1 = (int)x1; x2 = (int)x2; y1 = (int)y1; y2 = (int)y2; var adj = pen.Width; if (Math.Abs(x1 - x2) < .1 && Math.Abs(adj % 2 - 1) < .1) { x1 += .5; x2 += .5; } if (Math.Abs(y1 - y2) < .1 && Math.Abs(adj % 2 - 1) < .1) { y1 += .5; y2 += .5; } _g.DrawLine(((PenAdapter)pen).CreatePen(), new Point(x1, y1), new Point(x2, y2)); }
public override void DrawRectangle(RPen pen, double x, double y, double width, double height) { var adj = pen.Width; if (Math.Abs(adj % 2 - 1) < .1) { x += .5; y += .5; } _g.DrawRectangle(((PenAdapter) pen).CreatePen(), new Rect(x, y, width, height)); }
/// <summary> /// Draws a rectangle specified by a coordinate pair, a width, and a height. /// </summary> /// <param name="pen">A Pen that determines the color, width, and style of the rectangle. </param> /// <param name="x">The x-coordinate of the upper-left corner of the rectangle to draw. </param> /// <param name="y">The y-coordinate of the upper-left corner of the rectangle to draw. </param> /// <param name="width">The width of the rectangle to draw. </param> /// <param name="height">The height of the rectangle to draw. </param> public abstract void DrawRectangle(RPen pen, double x, double y, double width, double height);
/// <summary> /// Draws a GraphicsPath. /// </summary> /// <param name="pen">Pen that determines the color, width, and style of the path. </param> /// <param name="path">GraphicsPath to draw. </param> public abstract void DrawPath(RPen pen, RGraphicsPath path);
public override void DrawLine(RPen pen, double x1, double y1, double x2, double y2) { _g.DrawLine(((PenAdapter)pen).Pen, x1, y1, x2, y2); }
/// <summary> /// Draws a line connecting the two points specified by the coordinate pairs. /// </summary> /// <param name="pen">Pen that determines the color, width, and style of the line. </param> /// <param name="x1">The x-coordinate of the first point. </param> /// <param name="y1">The y-coordinate of the first point. </param> /// <param name="x2">The x-coordinate of the second point. </param> /// <param name="y2">The y-coordinate of the second point. </param> public abstract void DrawLine(RPen pen, double x1, double y1, double x2, double y2);
public override void DrawPath(RPen pen, RGraphicsPath path) { _g.DrawPath(((PenAdapter)pen).Pen, ((GraphicsPathAdapter)path).GraphicsPath); }
public override void DrawRectangle(RPen pen, double x, double y, double width, double height) { _g.DrawRectangle(((PenAdapter)pen).Pen, x, y, width, height); }
public override void DrawRectangle(RPen pen, double x, double y, double width, double height) { ReleaseHdc(); _g.DrawRectangle(((PenAdapter)pen).Pen, (float)x, (float)y, (float)width, (float)height); }
public override void DrawLine(RPen pen, double x1, double y1, double x2, double y2) { ReleaseHdc(); _g.DrawLine(((PenAdapter)pen).Pen, (float)x1, (float)y1, (float)x2, (float)y2); }