/// <summary>
 /// Draws the text using the given options onto the image filled via the brush then outlined via the pen.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="textOptions">The text rendering options.</param>
 /// <param name="text">The text to draw.</param>
 /// <param name="brush">The brush used to fill the text.</param>
 /// <param name="pen">The pen used to outline the text.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext DrawText(
     this IImageProcessingContext source,
     TextOptions textOptions,
     string text,
     IBrush brush,
     IPen pen) =>
 source.DrawText(source.GetDrawingOptions(), textOptions, text, brush, pen);
 /// <summary>
 /// Draws the text onto the image outlined via the pen.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="text">The text to draw.</param>
 /// <param name="font">The font.</param>
 /// <param name="pen">The pen used to outline the text.</param>
 /// <param name="location">The location.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext DrawText(
     this IImageProcessingContext source,
     string text,
     Font font,
     IPen pen,
     PointF location) =>
 source.DrawText(source.GetDrawingOptions(), text, font, pen, location);
 /// <summary>
 /// Flood fills the image within the provided region defined by an <see cref="IPath"/> using the specified brush
 /// without any blending.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="region">The <see cref="IPath"/> defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     IBrush brush,
     IPath region)
 => source.Clear(source.GetDrawingOptions(), brush, region);
Esempio n. 4
0
 /// <summary>
 /// Flood fills the image in the shape of the provided polygon with the specified brush.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="path">The logic path.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Fill(
     this IImageProcessingContext source,
     IBrush brush,
     IPath path) =>
 source.Fill(source.GetDrawingOptions(), brush, path);
Esempio n. 5
0
 /// <summary>
 /// Applies the processing operation within the provided region defined by an <see cref="IPath"/>.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="region">The <see cref="IPath"/> defining the region to operation within.</param>
 /// <param name="operation">The operation to perform.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clip(
     this IImageProcessingContext source,
     IPath region,
     Action <IImageProcessingContext> operation)
 => source.ApplyProcessor(new ClipPathProcessor(source.GetDrawingOptions(), region, operation));
 /// <summary>
 /// Draws the outline of the rectangle with the provided pen.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="shape">The shape.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Draw(this IImageProcessingContext source, IPen pen, RectangleF shape) =>
 source.Draw(source.GetDrawingOptions(), pen, shape);
 /// <summary>
 /// Flood fills the image within the provided region defined by an <see cref="PathBuilder"/> method
 /// using the specified brush.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="region">The <see cref="PathBuilder"/> method defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Fill(
     this IImageProcessingContext source,
     IBrush brush,
     Action <PathBuilder> region)
 => source.Fill(source.GetDrawingOptions(), brush, region);
 Draw(this IImageProcessingContext source, IPen pen, IPathCollection paths) =>
 source.Draw(source.GetDrawingOptions(), pen, paths);
 /// <summary>
 /// Draws the outline of the polygon with the provided pen.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="path">The path.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Draw(this IImageProcessingContext source, IPen pen, IPath path) =>
 source.Draw(source.GetDrawingOptions(), pen, path);
Esempio n. 10
0
 /// <summary>
 /// Draws the provided points as a closed linear polygon with the provided pen.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="points">The points.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext DrawPolygon(
     this IImageProcessingContext source,
     IPen pen,
     params PointF[] points) =>
 source.Draw(source.GetDrawingOptions(), pen, new Polygon(new LinearLineSegment(points)));