Beispiel #1
0
 /// <summary>
 /// Draws a <see cref="D2DFontPathData"/> to current <see cref="RenderContext"/>.
 /// </summary>
 /// <param name="context">The <see cref="RenderContext"/> to draw to.</param>
 /// <param name="pen">The <see cref="D2DPen"/> to use.</param>
 /// <param name="path">The <see cref="D2DFontPathData"/> to draw.</param>
 /// <param name="offsetX">The X offset on target <see cref="RenderContext"/>.</param>
 /// <param name="offsetY">The Y offset on target <see cref="RenderContext"/>.</param>
 /// <param name="yCorrection">If <see langword="true"/>, apply automatic Y correction: y(real) = offsetY + lineHeight. If <see langword="false"/>, the Y value stays untouched.</param>
 public static void DrawPath(this RenderContext context, ID2DPen pen, D2DFontPathData path, float offsetX, float offsetY, bool yCorrection)
 {
     if (yCorrection)
     {
         offsetY += path.LineHeight;
     }
     path.Draw(context, pen, offsetX, offsetY);
 }
Beispiel #2
0
 public static void DrawPath(this RenderContext context, ID2DPen pen, D2DFontPathData path)
 {
     path.Draw(context, pen);
 }