Пример #1
0
 /// <summary>
 /// Draws the text onto the the image filled via the brush.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="text">The text.</param>
 /// <param name="font">The font.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="location">The location.</param>
 /// <returns>
 /// The <see cref="Image{TPixel}" />.
 /// </returns>
 public static IImageProcessingContext DrawText(
     this IImageProcessingContext source,
     TextGraphicsOptions options,
     string text,
     Font font,
     IBrush brush,
     PointF location) =>
 source.DrawText(options, text, font, brush, null, location);
Пример #2
0
 /// <summary>
 /// Draws the text onto the the image filled via the brush.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="text">The text.</param>
 /// <param name="font">The font.</param>
 /// <param name="color">The color.</param>
 /// <param name="location">The location.</param>
 /// <returns>
 /// The <see cref="Image{TPixel}" />.
 /// </returns>
 public static IImageProcessingContext DrawText(
     this IImageProcessingContext source,
     TextGraphicsOptions options,
     string text,
     Font font,
     Color color,
     PointF location) =>
 source.DrawText(options, text, font, Brushes.Solid(color), null, location);
Пример #3
0
 /// <summary>
 /// Draws the text using the default resolution of <value>72dpi</value> onto the the image filled via the brush then outlined via the pen.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="text">The text.</param>
 /// <param name="font">The font.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="location">The location.</param>
 /// <returns>
 /// The <see cref="Image{TPixel}" />.
 /// </returns>
 public static IImageProcessingContext DrawText(
     this IImageProcessingContext source,
     TextGraphicsOptions options,
     string text,
     Font font,
     IBrush brush,
     IPen pen,
     PointF location) =>
 source.ApplyProcessor(new DrawTextProcessor(options, text, font, brush, pen, location));
Пример #4
0
 /// <summary>
 /// Draws the text onto the the image filled via the brush.
 /// </summary>
 /// <typeparam name="TPixel">The type of the color.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="text">The text.</param>
 /// <param name="font">The font.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="location">The location.</param>
 /// <returns>
 /// The <see cref="Image{TPixel}" />.
 /// </returns>
 public static IImageProcessingContext <TPixel> DrawText <TPixel>(this IImageProcessingContext <TPixel> source, TextGraphicsOptions options, string text, Font font, IBrush <TPixel> brush, PointF location)
     where TPixel : struct, IPixel <TPixel>
 => source.DrawText(options, text, font, brush, null, location);
Пример #5
0
 /// <summary>
 /// Draws the text using the default resolution of <value>72dpi</value> onto the the image filled via the brush then outlined via the pen.
 /// </summary>
 /// <typeparam name="TPixel">The type of the color.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="text">The text.</param>
 /// <param name="font">The font.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="location">The location.</param>
 /// <returns>
 /// The <see cref="Image{TPixel}" />.
 /// </returns>
 public static IImageProcessingContext <TPixel> DrawText <TPixel>(this IImageProcessingContext <TPixel> source, TextGraphicsOptions options, string text, Font font, IBrush <TPixel> brush, IPen <TPixel> pen, PointF location)
     where TPixel : struct, IPixel <TPixel>
 => source.ApplyProcessor(new DrawTextProcessor <TPixel>(options, text, font, brush, pen, location));