예제 #1
0
 public static extern void Clear([In] HANDLE context, D2DColor color);
예제 #2
0
 public void BeginRender(D2DColor color)
 {
     D2D.BeginRenderWithBackgroundColor(this.DeviceHandle, color);
 }
예제 #3
0
 public D2DGradientStop(FLOAT position, D2DColor color)
 {
     this.position = position;
     this.color    = color;
 }
예제 #4
0
 public void DrawText(string text, D2DColor color, string fontName, float fontSize, D2DRect rect,
                      DWRITE_TEXT_ALIGNMENT halign      = DWRITE_TEXT_ALIGNMENT.DWRITE_TEXT_ALIGNMENT_LEADING,
                      DWRITE_PARAGRAPH_ALIGNMENT valign = DWRITE_PARAGRAPH_ALIGNMENT.DWRITE_PARAGRAPH_ALIGNMENT_NEAR)
 {
     D2D.DrawText(this.DeviceHandle, text, color, fontName, fontSize, ref rect, halign, valign);
 }
예제 #5
0
 public void FillPath(D2DPathGeometry path, D2DColor fillColor)
 {
     D2D.FillPathD(path.Handle, fillColor);
 }
예제 #6
0
 public void FillRectangle(D2DPoint origin, D2DSize size, D2DColor color)
 {
     this.FillRectangle(new D2DRect(origin, size), color);
 }
예제 #7
0
 public void DrawRoundedRectangle(D2DRoundedRect roundedRect, D2DColor strokeColor, D2DColor fillColor,
                                  FLOAT strokeWidth = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawRoundedRect(this.DeviceHandle, ref roundedRect, strokeColor, fillColor, strokeWidth, dashStyle);
 }
예제 #8
0
 public void FillEllipse(FLOAT x, FLOAT y, FLOAT radial, D2DColor color)
 {
     this.FillEllipse(new D2DPoint(x, y), radial, radial, color);
 }
예제 #9
0
 public void FillEllipse(FLOAT x, FLOAT y, FLOAT w, FLOAT h, D2DColor color)
 {
     this.FillEllipse(new D2DPoint(x, y), w, h, color);
 }
예제 #10
0
 public void DrawEllipse(D2DEllipse ellipse, D2DColor color, FLOAT weight = 1,
                         D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawEllipse(this.DeviceHandle, ref ellipse, color, weight, dashStyle);
 }
예제 #11
0
 public void FillEllipse(D2DPoint p, FLOAT radial, D2DColor color)
 {
     this.FillEllipse(p, radial, radial, color);
 }
예제 #12
0
 public void DrawLines(D2DPoint[] points, D2DColor color, FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawLines(this.DeviceHandle, points, (uint)points.Length, color, weight, dashStyle);
 }
예제 #13
0
 public void DrawLine(D2DPoint start, D2DPoint end, D2DColor color,
                      FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawLine(this.DeviceHandle, start, end, color, weight, dashStyle);
 }
예제 #14
0
 public void DrawLine(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, D2DColor color,
                      FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     DrawLine(new D2DPoint(x1, y1), new D2DPoint(x2, y2), color, weight, dashStyle);
 }
예제 #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);
 }
예제 #16
0
 public void FillEllipse(D2DEllipse ellipse, D2DColor color)
 {
     D2D.FillEllipse(this.DeviceHandle, ref ellipse, color);
 }
예제 #17
0
        public void FillRectangle(float x, float y, float width, float height, D2DColor color)
        {
            var rect = new D2DRect(x, y, width, height);

            this.FillRectangle(rect, color);
        }
예제 #18
0
 public void DrawBeziers(D2DBezierSegment[] bezierSegments,
                         D2DColor strokeColor, FLOAT strokeWidth = 1,
                         D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawBeziers(DeviceHandle, bezierSegments, (uint)bezierSegments.Length, strokeColor, strokeWidth, dashStyle);
 }
예제 #19
0
 public void FillRectangle(D2DRect rect, D2DColor color)
 {
     D2D.FillRectangle(this.DeviceHandle, ref rect, color);
 }
예제 #20
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     this.DrawPolygon(points, strokeColor, strokeWidth, dashStyle, D2DColor.Transparent);
 }
예제 #21
0
 public void DrawTextCenter(string text, D2DColor color, string fontName, float fontSize, D2DRect rect)
 {
     this.DrawText(text, color, fontName, fontSize, rect,
                   DWRITE_TEXT_ALIGNMENT.DWRITE_TEXT_ALIGNMENT_CENTER, DWRITE_PARAGRAPH_ALIGNMENT.DWRITE_PARAGRAPH_ALIGNMENT_CENTER);
 }
예제 #22
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, D2DColor fillColor)
 {
     D2D.DrawPolygon(DeviceHandle, points, (uint)points.Length, strokeColor, strokeWidth, dashStyle, fillColor);
 }
예제 #23
0
 public void DrawPath(D2DPathGeometry path, D2DColor strokeColor,
                      FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawPath(path.Handle, strokeColor, strokeWidth, dashStyle);
 }
예제 #24
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth, D2DDashStyle dashStyle, D2DBrush fillBrush)
 {
     D2D.DrawPolygonWithBrush(DeviceHandle, points, (uint)points.Length, strokeColor, strokeWidth, dashStyle, fillBrush.Handle);
 }
예제 #25
0
 public void Clear(D2DColor color)
 {
     D2D.Clear(DeviceHandle, color);
 }
예제 #26
0
 public void FillPolygon(D2DPoint[] points, D2DColor fillColor)
 {
     this.DrawPolygon(points, D2DColor.Transparent, 0, D2DDashStyle.Solid, fillColor);
 }
예제 #27
0
        public D2DSolidColorBrush CreateSolidColorBrush(D2DColor color)
        {
            HANDLE handle = D2D.CreateSolidColorBrush(this.Handle, color);

            return(handle == HANDLE.Zero ? null : new D2DSolidColorBrush(handle, color));
        }
예제 #28
0
 public void DrawRectangle(D2DRect rect, D2DColor color, FLOAT strokeWidth = 1,
                           D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawRectangle(this.DeviceHandle, ref rect, color, strokeWidth, dashStyle);
 }
예제 #29
0
        public static System.Drawing.Color ToGDIColor(D2DColor d2color)
        {
            var c = MathFunctions.Clamp(d2color * 255);

            return(System.Drawing.Color.FromArgb((int)c.a, (int)c.r, (int)c.g, (int)c.b));
        }
예제 #30
0
 public static extern HANDLE BeginRenderWithBackgroundColor([In] HANDLE context, D2DColor backColor);