Beispiel #1
0
        public void DrawEllipse(D2DPoint origin, FLOAT radialX, FLOAT radialY, D2DColor color,
                                FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
        {
            var ellipse = new D2DEllipse(origin, radialX, radialY);

            this.DrawEllipse(ellipse, color, weight, dashStyle);
        }
Beispiel #2
0
        public void DrawRectangle(FLOAT x, FLOAT y, FLOAT w, FLOAT h, D2DColor color, FLOAT strokeWidth = 1,
                                  D2DDashStyle dashStyle = D2DDashStyle.Solid)
        {
            D2DRect rect = new D2DRect(x, y, w, h);

            D2D.DrawRectangle(this.Handle, ref rect, color, strokeWidth, dashStyle);
        }
Beispiel #3
0
        public D2DPen CreatePen(D2DColor color, D2DDashStyle dashStyle = D2DDashStyle.Solid,
                                float[] customDashes = null, float dashOffset = 0.0f)
        {
            HANDLE handle = D2D.CreatePen(this.Handle, color, dashStyle,
                                          customDashes, customDashes != null ? (uint)customDashes.Length : 0, dashOffset);

            return(handle == HANDLE.Zero ? null : new D2DPen(this, handle, color, dashStyle, customDashes, dashOffset));
        }
Beispiel #4
0
        public void DrawEllipse(FLOAT x, FLOAT y, FLOAT width, FLOAT height, D2DColor color,
                                FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
        {
            var ellipse = new D2DEllipse(x, y, width / 2f, height / 2f);

            ellipse.origin.x += ellipse.radiusX;
            ellipse.origin.y += ellipse.radiusY;

            this.DrawEllipse(ellipse, color, weight, dashStyle);
        }
Beispiel #5
0
 internal D2DPen(D2DDevice Device, HANDLE handle, D2DColor color, D2DDashStyle dashStyle = D2DDashStyle.Solid,
                 float[] customDashes = null, float dashOffset = 0f)
     : base(handle)
 {
     this.Device       = Device;
     this.Color        = color;
     this.DashStyle    = dashStyle;
     this.CustomDashes = customDashes;
     this.DashOffset   = dashOffset;
 }
Beispiel #6
0
 public static extern void DrawRoundedRect(HANDLE ctx, ref D2DRoundedRect roundedRect,
                                           D2DColor strokeColor, D2DColor fillColor,
                                           FLOAT strokeWidth = 1, D2DDashStyle strokeStyle = D2DDashStyle.Solid);
Beispiel #7
0
 public static extern void DrawEllipse(HANDLE context, ref D2DEllipse rect, D2DColor color,
                                       FLOAT width = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #8
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     this.DrawPolygon(points, strokeColor, strokeWidth, dashStyle, D2DColor.Transparent);
 }
Beispiel #9
0
 public static extern void DrawRectangle(HANDLE context, ref D2DRect rect, D2DColor color,
                                         FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #10
0
 public static extern bool PathStrokeContainsPoint(HANDLE pathCtx, D2DPoint point, FLOAT strokeWidth = 1,
                                                   D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #11
0
        public D2DPen CreatePen(D2DColor color, D2DDashStyle dashStyle)
        {
            HANDLE handle = D2D.CreatePen(this.Handle, color, dashStyle);

            return(handle == HANDLE.Zero ? null : new D2DPen(handle, color, dashStyle));
        }
Beispiel #12
0
 public void DrawRoundedRectangle(D2DRoundedRect roundedRect, D2DColor strokeColor, D2DColor fillColor,
                                  FLOAT strokeWidth = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawRoundedRect(this.Handle, ref roundedRect, strokeColor, fillColor, strokeWidth, dashStyle);
 }
Beispiel #13
0
 public static extern void DrawBeziers(HANDLE ctx, D2DBezierSegment[] bezierSegments, UINT count,
                                       D2DColor strokeColor, FLOAT strokeWidth = 1,
                                       D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #14
0
 public void DrawRectangle(D2DRect rect, D2DColor color, FLOAT strokeWidth = 1,
                           D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawRectangle(this.Handle, ref rect, color, strokeWidth, dashStyle);
 }
Beispiel #15
0
 public void DrawRectangle(D2DPoint origin, D2DSize size, D2DColor color, FLOAT strokeWidth = 1,
                           D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     this.DrawRectangle(new D2DRect(origin, size), color, strokeWidth, dashStyle);
 }
Beispiel #16
0
 public void DrawEllipse(D2DEllipse ellipse, D2DColor color, FLOAT weight = 1,
                         D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawEllipse(this.Handle, ref ellipse, color, weight, dashStyle);
 }
Beispiel #17
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, D2DBrush fillBrush)
 {
     D2D.DrawPolygonWithBrush(Handle, points, (uint)points.Length, strokeColor, strokeWidth, dashStyle, fillBrush.Handle);
 }
Beispiel #18
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, D2DColor fillColor)
 {
     D2D.DrawPolygon(Handle, points, (uint)points.Length, strokeColor, strokeWidth, dashStyle, fillColor);
 }
Beispiel #19
0
 public static extern void DrawPolygon(HANDLE ctx, D2DPoint[] points, UINT count,
                                       D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, D2DColor fillColor);
Beispiel #20
0
 public void DrawPath(D2DGeometry path, D2DColor strokeColor,
                      FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawPath(path.Handle, strokeColor, strokeWidth, dashStyle);
 }
Beispiel #21
0
 public static extern void DrawPolygonWithBrush(HANDLE ctx, D2DPoint[] points, UINT count,
                                                D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, HANDLE brushHandler);
Beispiel #22
0
 public bool StrokeContainsPoint(D2DPoint point, FLOAT width = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     return(D2D.PathStrokeContainsPoint(this.Handle, point, width, dashStyle));
 }
Beispiel #23
0
 public static extern void DrawPath(HANDLE path, D2DColor strokeColor, FLOAT strokeWidth = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #24
0
 public void DrawLines(D2DPoint[] points, D2DColor color, FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawLines(this.Handle, points, (uint)points.Length, color, weight, dashStyle);
 }
Beispiel #25
0
 public static extern HANDLE CreatePen(HANDLE ctx, D2DColor strokeColor, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #26
0
 public static extern void DrawLines(HANDLE context, D2DPoint[] points, UINT count, D2DColor color,
                                     FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #27
0
 public D2DPen(HANDLE handle, D2DColor color, D2DDashStyle dashStyle)
     : base(handle)
 {
     this.color     = color;
     this.dashStyle = dashStyle;
 }
Beispiel #28
0
 public void DrawBeziers(D2DBezierSegment[] bezierSegments,
                         D2DColor strokeColor, FLOAT strokeWidth = 1,
                         D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawBeziers(Handle, bezierSegments, (uint)bezierSegments.Length, strokeColor, strokeWidth, dashStyle);
 }
Beispiel #29
0
 public static extern void DrawLine(HANDLE context, D2DPoint start, D2DPoint end, D2DColor color,
                                    FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
Beispiel #30
0
 public void DrawLine(D2DPoint start, D2DPoint end, D2DColor color,
                      FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawLine(this.Handle, start, end, color, weight, dashStyle);
 }