Ejemplo n.º 1
0
 public static extern void Clear([In] HANDLE context, D2DColor color);
Ejemplo n.º 2
0
 public void BeginRender(D2DColor color)
 {
     D2D.BeginRenderWithBackgroundColor(this.DeviceHandle, color);
 }
Ejemplo n.º 3
0
 public D2DGradientStop(FLOAT position, D2DColor color)
 {
     this.position = position;
     this.color    = color;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 5
0
 public void FillPath(D2DPathGeometry path, D2DColor fillColor)
 {
     D2D.FillPathD(path.Handle, fillColor);
 }
Ejemplo n.º 6
0
 public void FillRectangle(D2DPoint origin, D2DSize size, D2DColor color)
 {
     this.FillRectangle(new D2DRect(origin, size), color);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 8
0
 public void FillEllipse(FLOAT x, FLOAT y, FLOAT radial, D2DColor color)
 {
     this.FillEllipse(new D2DPoint(x, y), radial, radial, color);
 }
Ejemplo n.º 9
0
 public void FillEllipse(FLOAT x, FLOAT y, FLOAT w, FLOAT h, D2DColor color)
 {
     this.FillEllipse(new D2DPoint(x, y), w, h, color);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 11
0
 public void FillEllipse(D2DPoint p, FLOAT radial, D2DColor color)
 {
     this.FillEllipse(p, radial, radial, color);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 16
0
 public void FillEllipse(D2DEllipse ellipse, D2DColor color)
 {
     D2D.FillEllipse(this.DeviceHandle, ref ellipse, color);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 19
0
 public void FillRectangle(D2DRect rect, D2DColor color)
 {
     D2D.FillRectangle(this.DeviceHandle, ref rect, color);
 }
Ejemplo n.º 20
0
 public void DrawPolygon(D2DPoint[] points,
                         D2DColor strokeColor, FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     this.DrawPolygon(points, strokeColor, strokeWidth, dashStyle, D2DColor.Transparent);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 23
0
 public void DrawPath(D2DPathGeometry path, D2DColor strokeColor,
                      FLOAT strokeWidth = 1f, D2DDashStyle dashStyle = D2DDashStyle.Solid)
 {
     D2D.DrawPath(path.Handle, strokeColor, strokeWidth, dashStyle);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 25
0
 public void Clear(D2DColor color)
 {
     D2D.Clear(DeviceHandle, color);
 }
Ejemplo n.º 26
0
 public void FillPolygon(D2DPoint[] points, D2DColor fillColor)
 {
     this.DrawPolygon(points, D2DColor.Transparent, 0, D2DDashStyle.Solid, fillColor);
 }
Ejemplo n.º 27
0
        public D2DSolidColorBrush CreateSolidColorBrush(D2DColor color)
        {
            HANDLE handle = D2D.CreateSolidColorBrush(this.Handle, color);

            return(handle == HANDLE.Zero ? null : new D2DSolidColorBrush(handle, color));
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 30
0
 public static extern HANDLE BeginRenderWithBackgroundColor([In] HANDLE context, D2DColor backColor);