Class GraphicsPath

Class GraphicsPath

Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)

Represents a series of connected lines and curves. This class cannot be inherited.

[JsonObject(MemberSerialization.OptIn)]
public sealed class GraphicsPath : ObjectWithBounds

Inheritance

objectObjectWithBoundsGraphicsPath

Inherited Members

ObjectWithBounds.GetBounds(Matrix), ObjectWithBounds.GetBounds(Matrix, Pen), ObjectWithBounds.Transform(Matrix), ObjectWithBounds.Equals(object), ObjectWithBounds.GetHashCode(), ObjectWithBounds.Bounds, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface. Example creates a new Image (of type Tiff), clears the surface and draws paths with the help of GraphicsPath class. At the end DrawPath method exposed by Graphics class is called to render the paths on surface.```csharp [C#]

                                                                                                                                                                                                                                                                                                                                         //Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                         using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                         {
                                                                                                                                                                                                                                                                                                                                             //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                             Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                             //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                             tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                             //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                 //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                 graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                 //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                 //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                 graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                 //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                 graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                                                                                                                                                                                                                                                 // save all changes.
                                                                                                                                                                                                                                                                                                                                                 image.Save();
                                                                                                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                                                                                                         }

## Constructors

### <a id="Aspose_Imaging_GraphicsPath__ctor"></a> GraphicsPath\(\)

Initializes a new instance of the Aspose.Imaging.GraphicsPath class.

```csharp
[JsonConstructor]
public GraphicsPath()

Examples

This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface. Example creates a new Image (of type Tiff), clears the surface and draws paths with the help of GraphicsPath class. At the end DrawPath method exposed by Graphics class is called to render the paths on surface.```csharp [C#]

                                                                                                                                                                                                                                                                                                                                         //Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                         using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                         {
                                                                                                                                                                                                                                                                                                                                             //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                             Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                             //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                             tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                             //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                 //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                 graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                 //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                 //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                 graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                 //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                 graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                                                                                                                                                                                                                                                 // save all changes.
                                                                                                                                                                                                                                                                                                                                                 image.Save();
                                                                                                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                                                                                                         }

### <a id="Aspose_Imaging_GraphicsPath__ctor_Aspose_Imaging_Figure___"></a> GraphicsPath\(Figure\[\]\)

Initializes a new instance of the Aspose.Imaging.GraphicsPath class.

```csharp
public GraphicsPath(Figure[] figures)

Parameters

figures Figure[]

The figures to initialize from.

GraphicsPath(Figure[], FillMode)

Initializes a new instance of the Aspose.Imaging.GraphicsPath class.

public GraphicsPath(Figure[] figures, FillMode fillMode)

Parameters

figures Figure[]

The figures to initialize from.

fillMode FillMode

The fill mode.

GraphicsPath(FillMode)

Initializes a new instance of the Aspose.Imaging.GraphicsPath class.

public GraphicsPath(FillMode fillMode)

Parameters

fillMode FillMode

The fill mode.

Properties

Bounds

Gets or sets the object’s bounds.

public override RectangleF Bounds { get; }

Property Value

RectangleF

Figures

Gets the path figures.

[JsonProperty]
public Figure[] Figures { get; }

Property Value

Figure[]

FillMode

Gets or sets a Aspose.Imaging.FillMode enumeration that determines how the interiors of shapes in this Aspose.Imaging.GraphicsPath are filled.

public FillMode FillMode { get; set; }

Property Value

FillMode

Methods

AddFigure(Figure)

Adds a new figure.

public void AddFigure(Figure figure)

Parameters

figure Figure

The figure to add.

Examples

This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface. Example creates a new Image (of type Tiff), clears the surface and draws paths with the help of GraphicsPath class. At the end DrawPath method exposed by Graphics class is called to render the paths on surface.```csharp [C#]

                                                                                                                                                                                                                                                                                                                                         //Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                         using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                         {
                                                                                                                                                                                                                                                                                                                                             //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                             Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                             //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                             tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                             //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                 //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                 graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                 //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                 figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                 //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                 graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                 //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                 graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                                                                                                                                                                                                                                                 // save all changes.
                                                                                                                                                                                                                                                                                                                                                 image.Save();
                                                                                                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                                                                                                         }

### <a id="Aspose_Imaging_GraphicsPath_AddFigures_Aspose_Imaging_Figure___"></a> AddFigures\(Figure\[\]\)

Adds new figures.

```csharp
public void AddFigures(Figure[] figures)

Parameters

figures Figure[]

The figures to add.

Examples

This example creates a new Image and draws a variety of shapes using Figures and GraphicsPath on the Image surface```csharp [C#]

                                                                                                                         //Creates an instance of BmpOptions and set its various properties            
                                                                                                                         Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
                                                                                                                         bmpOptions.BitsPerPixel = 24;

                                                                                                                         //Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
                                                                                                                         //Second Boolean parameter determines if the file to be created IsTemporal or not
                                                                                                                         bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"c:\temp\output.bmp", false);

                                                                                                                         //Create an instance of Image 
                                                                                                                         using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
                                                                                                                         {
                                                                                                                             //Create and initialize an instance of Graphics class
                                                                                                                             Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                             //Clear Graphics surface
                                                                                                                             graphics.Clear(Color.Wheat);

                                                                                                                             //Create an instance of GraphicsPath class
                                                                                                                             Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                             //Create an instance of Figure class
                                                                                                                             Aspose.Imaging.Figure figure1 = new Aspose.Imaging.Figure();

                                                                                                                             //Add Shape to Figure object
                                                                                                                             figure1.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new RectangleF(50, 50, 300, 300)));
                                                                                                                             figure1.AddShape(new Aspose.Imaging.Shapes.PieShape(new Rectangle(new Point(110, 110), new Size(200, 200)), 0, 90));

                                                                                                                             //Create an instance of Figure class
                                                                                                                             Aspose.Imaging.Figure figure2 = new Aspose.Imaging.Figure();

                                                                                                                             //Add Shape to Figure object
                                                                                                                             figure2.AddShape(new Aspose.Imaging.Shapes.ArcShape(new Aspose.Imaging.RectangleF(10, 10, 300, 300), 0, 45));
                                                                                                                             figure2.AddShape(new Aspose.Imaging.Shapes.PolygonShape(new[] { new Aspose.Imaging.PointF(150, 10), new Aspose.Imaging.PointF(150, 200), new Aspose.Imaging.PointF(250, 300), new Aspose.Imaging.PointF(350, 400) }, true));
                                                                                                                             figure2.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(200, 200))));

                                                                                                                             //Add Figure object to GraphicsPath
                                                                                                                             graphicspath.AddFigures(new[] { figure1, figure2 });

                                                                                                                             //Draw path with Pen object of color Black
                                                                                                                             graphics.DrawPath(new Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                             // save all changes.
                                                                                                                             image.Save();
                                                                                                                         }

### <a id="Aspose_Imaging_GraphicsPath_AddPath_Aspose_Imaging_GraphicsPath_"></a> AddPath\(GraphicsPath\)

Appends the specified Aspose.Imaging.GraphicsPath to this path.

```csharp
public void AddPath(GraphicsPath addingPath)

Parameters

addingPath GraphicsPath

The Aspose.Imaging.GraphicsPath to add.

AddPath(GraphicsPath, bool)

Appends the specified Aspose.Imaging.GraphicsPath to this path.

public void AddPath(GraphicsPath addingPath, bool connect)

Parameters

addingPath GraphicsPath

The Aspose.Imaging.GraphicsPath to add.

connect bool

A Boolean value that specifies whether the first figure in the added path is part of the last figure in this path. A value of true specifies that the first figure in the added path is part of the last figure in this path. A value of false specifies that the first figure in the added path is separate from the last figure in this path.

DeepClone()

Performs a deep clone of this graphics path.

public GraphicsPath DeepClone()

Returns

GraphicsPath

A deep clone of the graphics path.

Equals(object)

Check if objects are equal.

public override bool Equals(object obj)

Parameters

obj object

The other object.

Returns

bool

The equality comparison result.

Flatten()

Converts each curve in this path into a sequence of connected line segments.

public void Flatten()

Flatten(Matrix)

Applies the specified transform and then converts each curve in this Aspose.Imaging.GraphicsPath into a sequence of connected line segments.

public void Flatten(Matrix matrix)

Parameters

matrix Matrix

A Aspose.Imaging.Matrix by which to transform this Aspose.Imaging.GraphicsPath before flattening.

Flatten(Matrix, float)

Converts each curve in this Aspose.Imaging.GraphicsPath into a sequence of connected line segments.

public void Flatten(Matrix matrix, float flatness)

Parameters

matrix Matrix

A Aspose.Imaging.Matrix by which to transform this Aspose.Imaging.GraphicsPath before flattening.

flatness float

Specifies the maximum permitted error between the curve and its flattened approximation. A value of 0.25 is the default. Reducing the flatness value will increase the number of line segments in the approximation.

GetBounds(Matrix)

Gets the object’s bounds.

public override RectangleF GetBounds(Matrix matrix)

Parameters

matrix Matrix

The matrix to apply before bounds will be calculated.

Returns

RectangleF

The estimated object’s bounds.

GetBounds(Matrix, Pen)

Gets the object’s bounds.

public override RectangleF GetBounds(Matrix matrix, Pen pen)

Parameters

matrix Matrix

The matrix to apply before bounds will be calculated.

pen Pen

The pen to use for object. This can influence the object’s bounds size.

Returns

RectangleF

The estimated object’s bounds.

GetHashCode()

Get hash code of the current object.

public override int GetHashCode()

Returns

int

The hash code.

IsOutlineVisible(float, float, Pen)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen.

public bool IsOutlineVisible(float x, float y, Pen pen)

Parameters

x float

The x-coordinate of the point to test.

y float

The y-coordinate of the point to test.

pen Pen

The Aspose.Imaging.Pen to test.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(PointF, Pen)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen.

public bool IsOutlineVisible(PointF point, Pen pen)

Parameters

point PointF

A Aspose.Imaging.PointF that specifies the location to test.

pen Pen

The Aspose.Imaging.Pen to test.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(float, float, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen and using the specified Aspose.Imaging.Graphics.

public bool IsOutlineVisible(float x, float y, Pen pen, Graphics graphics)

Parameters

x float

The x-coordinate of the point to test.

y float

The y-coordinate of the point to test.

pen Pen

The Aspose.Imaging.Pen to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath as drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(PointF, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen and using the specified Aspose.Imaging.Graphics.

public bool IsOutlineVisible(PointF pt, Pen pen, Graphics graphics)

Parameters

pt PointF

A Aspose.Imaging.PointF that specifies the location to test.

pen Pen

The Aspose.Imaging.Pen to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath as drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(int, int, Pen)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen.

public bool IsOutlineVisible(int x, int y, Pen pen)

Parameters

x int

The x-coordinate of the point to test.

y int

The y-coordinate of the point to test.

pen Pen

The Aspose.Imaging.Pen to test.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(Point, Pen)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen.

public bool IsOutlineVisible(Point point, Pen pen)

Parameters

point Point

A Aspose.Imaging.Point that specifies the location to test.

pen Pen

The Aspose.Imaging.Pen to test.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(int, int, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen and using the specified Aspose.Imaging.Graphics.

public bool IsOutlineVisible(int x, int y, Pen pen, Graphics graphics)

Parameters

x int

The x-coordinate of the point to test.

y int

The y-coordinate of the point to test.

pen Pen

The Aspose.Imaging.Pen to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath as drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsOutlineVisible(Point, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this Aspose.Imaging.GraphicsPath when drawn with the specified Aspose.Imaging.Pen and using the specified Aspose.Imaging.Graphics.

public bool IsOutlineVisible(Point pt, Pen pen, Graphics graphics)

Parameters

pt Point

A Aspose.Imaging.Point that specifies the location to test.

pen Pen

The Aspose.Imaging.Pen to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within the outline of this Aspose.Imaging.GraphicsPath as drawn with the specified Aspose.Imaging.Pen; otherwise, false.

IsVisible(float, float)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(float x, float y)

Parameters

x float

The x-coordinate of the point to test.

y float

The y-coordinate of the point to test.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(PointF)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(PointF point)

Parameters

point PointF

A Aspose.Imaging.PointF that represents the point to test.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(int, int)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(int x, int y)

Parameters

x int

The x-coordinate of the point to test.

y int

The y-coordinate of the point to test.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(Point)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(Point point)

Parameters

point Point

A Aspose.Imaging.Point that represents the point to test.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(float, float, Graphics)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath in the visible clip region of the specified Aspose.Imaging.Graphics.

public bool IsVisible(float x, float y, Graphics graphics)

Parameters

x float

The x-coordinate of the point to test.

y float

The y-coordinate of the point to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(PointF, Graphics)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(PointF pt, Graphics graphics)

Parameters

pt PointF

A Aspose.Imaging.PointF that represents the point to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within this; otherwise, false.

IsVisible(int, int, Graphics)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath, using the specified Aspose.Imaging.Graphics.

public bool IsVisible(int x, int y, Graphics graphics)

Parameters

x int

The x-coordinate of the point to test.

y int

The y-coordinate of the point to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

IsVisible(Point, Graphics)

Indicates whether the specified point is contained within this Aspose.Imaging.GraphicsPath.

public bool IsVisible(Point pt, Graphics graphics)

Parameters

pt Point

A Aspose.Imaging.Point that represents the point to test.

graphics Graphics

The Aspose.Imaging.Graphics for which to test visibility.

Returns

bool

This method returns true if the specified point is contained within this Aspose.Imaging.GraphicsPath; otherwise, false.

RemoveFigure(Figure)

Removes a figure.

public void RemoveFigure(Figure figure)

Parameters

figure Figure

The figure to remove.

RemoveFigures(Figure[])

Removes figures.

public void RemoveFigures(Figure[] figures)

Parameters

figures Figure[]

The figures to remove.

Reset()

Empties the graphics path and sets the Aspose.Imaging.FillMode to Aspose.Imaging.FillMode.Alternate.

public void Reset()

Reverse()

Reverses the order of figures, shapes, and points in each shape of this Aspose.Imaging.GraphicsPath.

public void Reverse()

Transform(Matrix)

Applies the specified transformation to the shape.

public override void Transform(Matrix transform)

Parameters

transform Matrix

The transformation to apply.

Warp(PointF[], RectangleF)

Applies a warp transform, defined by a rectangle and a parallelogram, to this Aspose.Imaging.GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect)

Parameters

destPoints PointF[]

An array of Aspose.Imaging.PointF structures that define a parallelogram to which the rectangle defined by srcRect is transformed. The array can contain either three or four elements. If the array contains three elements, the lower-right corner of the parallelogram is implied by the first three points.

srcRect RectangleF

A Aspose.Imaging.RectangleF that represents the rectangle that is transformed to the parallelogram defined by destPoints.

Warp(PointF[], RectangleF, Matrix)

Applies a warp transform, defined by a rectangle and a parallelogram, to this Aspose.Imaging.GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix)

Parameters

destPoints PointF[]

An array of Aspose.Imaging.PointF structures that define a parallelogram to which the rectangle defined by srcRect is transformed. The array can contain either three or four elements. If the array contains three elements, the lower-right corner of the parallelogram is implied by the first three points.

srcRect RectangleF

A Aspose.Imaging.RectangleF that represents the rectangle that is transformed to the parallelogram defined by destPoints.

matrix Matrix

A Aspose.Imaging.Matrix that specifies a geometric transform to apply to the path.

Warp(PointF[], RectangleF, Matrix, WarpMode)

Applies a warp transform, defined by a rectangle and a parallelogram, to this Aspose.Imaging.GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode)

Parameters

destPoints PointF[]

An array of Aspose.Imaging.PointF structures that defines a parallelogram to which the rectangle defined by srcRect is transformed. The array can contain either three or four elements. If the array contains three elements, the lower-right corner of the parallelogram is implied by the first three points.

srcRect RectangleF

A Aspose.Imaging.RectangleF that represents the rectangle that is transformed to the parallelogram defined by destPoints.

matrix Matrix

A Aspose.Imaging.Matrix that specifies a geometric transform to apply to the path.

warpMode WarpMode

A Aspose.Imaging.WarpMode enumeration that specifies whether this warp operation uses perspective or bilinear mode.

Warp(PointF[], RectangleF, Matrix, WarpMode, float)

Applies a warp transform, defined by a rectangle and a parallelogram, to this Aspose.Imaging.GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode, float flatness)

Parameters

destPoints PointF[]

An array of Aspose.Imaging.PointF structures that define a parallelogram to which the rectangle defined by srcRect is transformed. The array can contain either three or four elements. If the array contains three elements, the lower-right corner of the parallelogram is implied by the first three points.

srcRect RectangleF

A Aspose.Imaging.RectangleF that represents the rectangle that is transformed to the parallelogram defined by destPoints.

matrix Matrix

A Aspose.Imaging.Matrix that specifies a geometric transform to apply to the path.

warpMode WarpMode

A Aspose.Imaging.WarpMode enumeration that specifies whether this warp operation uses perspective or bilinear mode.

flatness float

A value from 0 through 1 that specifies how flat the resulting path is. For more information, see the Aspose.Imaging.GraphicsPath.Flatten methods.

Widen(Pen)

Adds an additional outline to the path.

public void Widen(Pen pen)

Parameters

pen Pen

A Aspose.Imaging.Pen that specifies the width between the original outline of the path and the new outline this method creates.

Widen(Pen, Matrix)

Adds an additional outline to the Aspose.Imaging.GraphicsPath.

public void Widen(Pen pen, Matrix matrix)

Parameters

pen Pen

A Aspose.Imaging.Pen that specifies the width between the original outline of the path and the new outline this method creates.

matrix Matrix

A Aspose.Imaging.Matrix that specifies a transform to apply to the path before widening.

Widen(Pen, Matrix, float)

Replaces this Aspose.Imaging.GraphicsPath with curves that enclose the area that is filled when this path is drawn by the specified pen.

public void Widen(Pen pen, Matrix matrix, float flatness)

Parameters

pen Pen

A Aspose.Imaging.Pen that specifies the width between the original outline of the path and the new outline this method creates.

matrix Matrix

A Aspose.Imaging.Matrix that specifies a transform to apply to the path before widening.

flatness float

A value that specifies the flatness for curves.