Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void SetTextAlignment(DWriteTextAlignment textAlignment)
 => Direct2D_SetTextAlignmentForTextFormat(TextFormatPtr, textAlignment);
Exemplo n.º 3
0
 public void DrawText(string text, D2DColor color, string fontName, float fontSize, D2DRect rect,
                      DWriteTextAlignment halign      = DWriteTextAlignment.Leading,
                      DWriteParagraphAlignment valign = DWriteParagraphAlignment.Near)
 {
     D2D.DrawText(this.Handle, text, color, fontName, fontSize, ref rect, halign, valign);
 }
Exemplo n.º 4
0
 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] DWriteTextAlignment halign      = DWriteTextAlignment.Leading,
                                    [In] DWriteParagraphAlignment valign = DWriteParagraphAlignment.Near);
 public static extern void Direct2D_SetTextAlignmentForTextLayout(IntPtr pTextLayout, DWriteTextAlignment textAlignment);