public D2DLayer PushLayer(D2DGeometry geometry = null) { // FIXME: resolve to not use magic number D2DRect rectBounds = new D2DRect(-999999, -999999, 999999999, 999999999); return(PushLayer(rectBounds, geometry)); }
public void DrawBitmap(D2DBitmap bitmap, D2DRect destRect, FLOAT opacity = 1, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear) { var srcRect = new D2DRect(0, 0, bitmap.Width, bitmap.Height); this.DrawBitmap(bitmap, destRect, srcRect, opacity, interpolationMode); }
// FIXME: TO be implemented //public void FillGeometry(D2DBrush brush, [Optional] D2DBrush opacityBrush) //{ // // TODO //} public D2DRect GetBounds() { var rect = new D2DRect(); D2D.GetGeometryBounds(this.Handle, ref rect); return(rect); }
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); }
public void DrawText(string text, D2DColor color, string fontName, float fontSize, FLOAT x, FLOAT y, DWRITE_TEXT_ALIGNMENT halign = DWRITE_TEXT_ALIGNMENT.DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT valign = DWRITE_PARAGRAPH_ALIGNMENT.DWRITE_PARAGRAPH_ALIGNMENT_NEAR) { D2DRect rect = new D2DRect(x, y, 9999999, 9999999); // FIXME: avoid magic number D2D.DrawText(this.Handle, text, color, fontName, fontSize, ref rect, halign, valign); }
public void DrawText(string text, D2DColor color, string fontName, float fontSize, FLOAT x, FLOAT y, DWriteTextAlignment halign = DWriteTextAlignment.Leading, DWriteParagraphAlignment valign = DWriteParagraphAlignment.Near) { D2DRect rect = new D2DRect(x, y, 9999999, 9999999); // FIXME: avoid magic number D2D.DrawText(this.Handle, text, color, fontName, fontSize, ref rect, halign, valign); }
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.Handle, text, color, fontName, fontSize, ref rect, halign, valign); }
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); }
public static extern void DrawBitmapRenderTarget([In] HANDLE context, HANDLE bitmapRenderTarget, ref D2DRect rect, FLOAT opacity = 1, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear);
public static extern void GetGeometryTransformedBounds(HANDLE pathCtx, ref D2DMatrix3x2 mat3x2, ref D2DRect rect);
public static extern HANDLE CreateRectangleGeometry([In] HANDLE ctx, [In] ref D2DRect rect);
public static extern void FillRectangleWithBrush(HANDLE context, ref D2DRect rect, HANDLE brush);
public void FillRectangle(D2DRect rect, D2DColor color) { D2D.FillRectangle(this.Handle, ref rect, color); }
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); }
public void DrawRectangle(D2DRect rect, D2DPen strokePen, FLOAT strokeWidth = 1) { D2D.DrawRectangleWithPen(this.Handle, ref rect, strokePen.Handle, strokeWidth); }
public void DrawRectangle(D2DRect rect, D2DColor color, FLOAT strokeWidth = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid) { D2D.DrawRectangle(this.Handle, ref rect, color, strokeWidth, dashStyle); }
public void PushClip(D2DRect rect) { D2D.PushClip(this.Handle, ref rect); }
public static extern void DrawRectangle(HANDLE context, ref D2DRect rect, D2DColor color, FLOAT weight = 1, D2DDashStyle dashStyle = D2DDashStyle.Solid);
public static extern void FillRectangle(HANDLE context, ref D2DRect rect, D2DColor color);
public void FillRectangle(D2DRect rect, D2DBrush brush) { D2D.FillRectangleWithBrush(this.Handle, ref rect, brush.Handle); }
public static extern void DrawText([In] HANDLE context, [In] string text, [In] D2DColor color, [In] string fontName, [In] FLOAT fontSize, [In] ref D2DRect rect, [In] DWRITE_TEXT_ALIGNMENT halign = DWRITE_TEXT_ALIGNMENT.DWRITE_TEXT_ALIGNMENT_LEADING, [In] DWRITE_PARAGRAPH_ALIGNMENT valign = DWRITE_PARAGRAPH_ALIGNMENT.DWRITE_PARAGRAPH_ALIGNMENT_NEAR);
public static extern void DrawD2DBitmap(HANDLE context, HANDLE bitmap, ref D2DRect destRect, ref D2DRect srcRect, FLOAT opacity = 1, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear);
public static extern void DrawD2DBitmap(HANDLE context, HANDLE bitmap, ref D2DRect destRect);
public D2DRectangleGeometry CreateRectangleGeometry(FLOAT width, FLOAT height) { var rect = new D2DRect(0, 0, width, height); return(CreateRectangleGeometry(ref rect)); }
public static extern void DrawGDIBitmapRect(HANDLE context, HANDLE bitmap, ref D2DRect destRect, ref D2DRect srcRect, FLOAT opacity = 1, bool alpha = false, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear);
public void DrawBitmap(D2DBitmap bitmap, D2DRect destRect, D2DRect srcRect, FLOAT opacity = 1, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear) { D2D.DrawD2DBitmap(this.Handle, bitmap.Handle, ref destRect, ref srcRect, opacity, interpolationMode); }
public D2DRectangleGeometry CreateRectangleGeometry(ref D2DRect rect) { HANDLE rectHandle = D2D.CreateRectangleGeometry(this.Handle, ref rect); return(new D2DRectangleGeometry(this.Handle, rectHandle)); }
public void DrawBitmap(D2DBitmapGraphics bg, D2DRect rect, FLOAT opacity = 1, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear) { D2D.DrawBitmapRenderTarget(this.Handle, bg.Handle, ref rect, opacity, interpolationMode); }
public static extern void PushClip([In] HANDLE context, [In] ref D2DRect rect, D2DAntialiasMode antiAliasMode = D2DAntialiasMode.PerPrimitive);
public void DrawGDIBitmap(HANDLE hbitmap, D2DRect rect, D2DRect srcRect, FLOAT opacity = 1, bool alpha = false, D2DBitmapInterpolationMode interpolationMode = D2DBitmapInterpolationMode.Linear) { D2D.DrawGDIBitmapRect(this.Handle, hbitmap, ref rect, ref srcRect, opacity, alpha, interpolationMode); }