mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 10:55:04 +08:00
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
namespace UglyToad.PdfPig.Graphics.Operations.PathPainting
|
|
{
|
|
using System.IO;
|
|
|
|
/// <inheritdoc />
|
|
/// <summary>
|
|
/// Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill.
|
|
/// </summary>
|
|
public class FillPathNonZeroWindingAndStroke : IGraphicsStateOperation
|
|
{
|
|
/// <summary>
|
|
/// The symbol for this operation in a stream.
|
|
/// </summary>
|
|
public const string Symbol = "B";
|
|
|
|
/// <summary>
|
|
/// The instance of the <see cref="FillPathNonZeroWindingAndStroke"/> operation.
|
|
/// </summary>
|
|
public static readonly FillPathNonZeroWindingAndStroke Value = new FillPathNonZeroWindingAndStroke();
|
|
|
|
/// <inheritdoc />
|
|
public string Operator => Symbol;
|
|
|
|
private FillPathNonZeroWindingAndStroke()
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Run(IOperationContext operationContext)
|
|
{
|
|
operationContext.FillPath(false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Write(Stream stream)
|
|
{
|
|
stream.WriteText(Symbol);
|
|
stream.WriteNewLine();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string ToString()
|
|
{
|
|
return Symbol;
|
|
}
|
|
}
|
|
} |