GraphicsPath Class
Summary: Represents a series of connected lines and curves. This class cannot be inherited.
Module: aspose.psd
Full Name: aspose.psd.GraphicsPath
Inheritance: ObjectWithBounds
Aspose.PSD Version: 24.12.0
Constructors
| Name | Description |
|---|---|
| GraphicsPath() | Initializes a new instance of the GraphicsPath class. |
| GraphicsPath(figures) | Initializes a new instance of the GraphicsPath class. |
| GraphicsPath(figures, fill_mode) | Initializes a new instance of the GraphicsPath class. |
| GraphicsPath(fill_mode) | Initializes a new instance of the GraphicsPath class. |
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| bounds | RectangleF | r | Gets or sets the object’s bounds. |
| figures | Figure[] | r | Gets the path figures. |
| fill_mode | FillMode | r/w | Gets or sets a FillMode enumeration that determines how the interiors of shapes in this GraphicsPath are filled. |
Methods
| Name | Description |
|---|---|
| add_figure(figure) | Adds a new figure. |
| add_figures(figures) | Adds new figures. |
| add_path(adding_path) | Appends the specified GraphicsPath to this path. |
| add_path(adding_path, connect) | Appends the specified GraphicsPath to this path. |
| deep_clone() | Performs a deep clone of this graphics path. |
| flatten() | Converts each curve in this path into a sequence of connected line segments. |
| flatten(matrix) | Applies the specified transform and then converts each curve in this GraphicsPath into a sequence of connected line segments. |
| flatten(matrix, flatness) | Converts each curve in this GraphicsPath into a sequence of connected line segments. |
| get_bounds(matrix) | Gets the object’s bounds. |
| get_bounds(matrix, pen) | Gets the object’s bounds. |
| is_outline_visible(point, pen) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| is_outline_visible(point, pen) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| is_outline_visible(pt, pen, graphics) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| is_outline_visible(pt, pen, graphics) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| is_outline_visible(x, y, pen) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| is_outline_visible(x, y, pen) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| is_outline_visible(x, y, pen, graphics) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| is_outline_visible(x, y, pen, graphics) | Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| is_visible(point) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(point) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(pt, graphics) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(pt, graphics) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(x, y) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(x, y) | Indicates whether the specified point is contained within this GraphicsPath. |
| is_visible(x, y, graphics) | Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics. |
| is_visible(x, y, graphics) | Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics. |
| remove_figure(figure) | Removes a figure. |
| remove_figures(figures) | Removes figures. |
| reset() | Empties the graphics path and sets the FillMode to FillMode.ALTERNATE. |
| reverse() | Reverses the order of figures, shapes, and points in each shape of this GraphicsPath. |
| transform(transform) | Applies the specified transformation to the shape. |
| warp(dest_points, src_rect) | Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath. |
| warp(dest_points, src_rect, matrix) | Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath. |
| warp(dest_points, src_rect, matrix, warp_mode) | Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath. |
| warp(dest_points, src_rect, matrix, warp_mode, flatness) | Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath. |
| widen(pen) | Adds an additional outline to the path. |
| widen(pen, matrix) | Adds an additional outline to the GraphicsPath. |
| widen(pen, matrix, flatness) | Replaces this GraphicsPath with curves that enclose the area that is filled when this path is drawn by the specified pen. |
Constructor: GraphicsPath()
GraphicsPath()
Initializes a new instance of the GraphicsPath class.
Constructor: GraphicsPath(figures)
GraphicsPath(figures)
Initializes a new instance of the GraphicsPath class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figures | Figure[] | The figures to initialize from. |
Constructor: GraphicsPath(figures, fill_mode)
GraphicsPath(figures, fill_mode)
Initializes a new instance of the GraphicsPath class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figures | Figure[] | The figures to initialize from. |
| fill_mode | FillMode | The fill mode. |
Constructor: GraphicsPath(fill_mode)
GraphicsPath(fill_mode)
Initializes a new instance of the GraphicsPath class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fill_mode | FillMode | The fill mode. |
Method: add_figure(figure)
add_figure(figure)
Adds a new figure.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figure | Figure | The figure to add. |
Method: add_figures(figures)
add_figures(figures)
Adds new figures.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figures | Figure[] | The figures to add. |
Method: add_path(adding_path)
add_path(adding_path)
Appends the specified GraphicsPath to this path.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| adding_path | GraphicsPath | The GraphicsPath to add. |
Method: add_path(adding_path, connect)
add_path(adding_path, connect)
Appends the specified GraphicsPath to this path.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| adding_path | GraphicsPath | The 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. |
Method: deep_clone()
deep_clone()
Performs a deep clone of this graphics path.
Returns
| Type | Description |
|---|---|
| GraphicsPath | A deep clone of the graphics path. |
Method: flatten(matrix)
flatten(matrix)
Applies the specified transform and then converts each curve in this GraphicsPath into a sequence of connected line segments.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| matrix | Matrix | A Matrix by which to transform this GraphicsPath before flattening. |
Method: flatten(matrix, flatness)
flatten(matrix, flatness)
Converts each curve in this GraphicsPath into a sequence of connected line segments.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| matrix | Matrix | A Matrix by which to transform this 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. |
Method: get_bounds(matrix)
get_bounds(matrix)
Gets the object’s bounds.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| matrix | Matrix | The matrix to apply before bounds will be calculated. |
Returns
| Type | Description |
|---|---|
| RectangleF | The estimated object’s bounds. |
Method: get_bounds(matrix, pen)
get_bounds(matrix, pen)
Gets the object’s bounds.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
| RectangleF | The estimated object’s bounds. |
Method: is_outline_visible(point, pen)
is_outline_visible(point, pen)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| point | PointF | A PointF that specifies the location to test. |
| pen | Pen | The Pen to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(point, pen)
is_outline_visible(point, pen)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| point | Point | A PointF that specifies the location to test. |
| pen | Pen | The Pen to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(pt, pen, graphics)
is_outline_visible(pt, pen, graphics)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | A PointF that specifies the location to test. |
| pen | Pen | The Pen to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(pt, pen, graphics)
is_outline_visible(pt, pen, graphics)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | Point | A PointF that specifies the location to test. |
| pen | Pen | The Pen to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(x, y, pen)
is_outline_visible(x, y, pen)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | float | The x-coordinate of the point to test. |
| y | float | The y-coordinate of the point to test. |
| pen | Pen | The Pen to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(x, y, pen)
is_outline_visible(x, y, pen)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | int | The x-coordinate of the point to test. |
| y | int | The y-coordinate of the point to test. |
| pen | Pen | The Pen to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(x, y, pen, graphics)
is_outline_visible(x, y, pen, graphics)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | float | The x-coordinate of the point to test. |
| y | float | The y-coordinate of the point to test. |
| pen | Pen | The Pen to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false. |
Method: is_outline_visible(x, y, pen, graphics)
is_outline_visible(x, y, pen, graphics)
Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | int | The x-coordinate of the point to test. |
| y | int | The y-coordinate of the point to test. |
| pen | Pen | The Pen to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false. |
Method: is_visible(point)
is_visible(point)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| point | PointF | A PointF that represents the point to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: is_visible(point)
is_visible(point)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| point | Point | A PointF that represents the point to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: is_visible(pt, graphics)
is_visible(pt, graphics)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | A PointF that represents the point to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this; otherwise, false. |
Method: is_visible(pt, graphics)
is_visible(pt, graphics)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | Point | A PointF that represents the point to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this; otherwise, false. |
Method: is_visible(x, y)
is_visible(x, y)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | float | The x-coordinate of the point to test. |
| y | float | The y-coordinate of the point to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: is_visible(x, y)
is_visible(x, y)
Indicates whether the specified point is contained within this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | int | The x-coordinate of the point to test. |
| y | int | The y-coordinate of the point to test. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: is_visible(x, y, graphics)
is_visible(x, y, graphics)
Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | float | The x-coordinate of the point to test. |
| y | float | The y-coordinate of the point to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: is_visible(x, y, graphics)
is_visible(x, y, graphics)
Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | int | The x-coordinate of the point to test. |
| y | int | The y-coordinate of the point to test. |
| graphics | Graphics | The Graphics for which to test visibility. |
Returns
| Type | Description |
|---|---|
| bool | This method returns true if the specified point is contained within this GraphicsPath; otherwise, false. |
Method: remove_figure(figure)
remove_figure(figure)
Removes a figure.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figure | Figure | The figure to remove. |
Method: remove_figures(figures)
remove_figures(figures)
Removes figures.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| figures | Figure[] | The figures to remove. |
Method: transform(transform)
transform(transform)
Applies the specified transformation to the shape.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| transform | Matrix | The transformation to apply. |
Method: warp(dest_points, src_rect)
warp(dest_points, src_rect)
Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| dest_points | PointF[] | An array of PointF structures that define a parallelogram to which the rectangle defined by |
| src_rect | RectangleF | A RectangleF that represents the rectangle that is transformed to the parallelogram defined by |
Method: warp(dest_points, src_rect, matrix)
warp(dest_points, src_rect, matrix)
Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| dest_points | PointF[] | An array of PointF structures that define a parallelogram to which the rectangle defined by |
| src_rect | RectangleF | A RectangleF that represents the rectangle that is transformed to the parallelogram defined by |
| matrix | Matrix | A Matrix that specifies a geometric transform to apply to the path. |
Method: warp(dest_points, src_rect, matrix, warp_mode)
warp(dest_points, src_rect, matrix, warp_mode)
Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| dest_points | PointF[] | An array of PointF structures that defines a parallelogram to which the rectangle defined by |
| src_rect | RectangleF | A RectangleF that represents the rectangle that is transformed to the parallelogram defined by |
| matrix | Matrix | A Matrix that specifies a geometric transform to apply to the path. |
| warp_mode | WarpMode | A WarpMode enumeration that specifies whether this warp operation uses perspective or bilinear mode. |
Method: warp(dest_points, src_rect, matrix, warp_mode, flatness)
warp(dest_points, src_rect, matrix, warp_mode, flatness)
Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| dest_points | PointF[] | An array of PointF structures that define a parallelogram to which the rectangle defined by |
| src_rect | RectangleF | A RectangleF that represents the rectangle that is transformed to the parallelogram defined by |
| matrix | Matrix | A Matrix that specifies a geometric transform to apply to the path. |
| warp_mode | WarpMode | A 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 GraphicsPath.flatten() methods. |
Method: widen(pen)
widen(pen)
Adds an additional outline to the path.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pen | Pen | A Pen that specifies the width between the original outline of the path and the new outline this method creates. |
Method: widen(pen, matrix)
widen(pen, matrix)
Adds an additional outline to the GraphicsPath.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pen | Pen | A Pen that specifies the width between the original outline of the path and the new outline this method creates. |
| matrix | Matrix | A Matrix that specifies a transform to apply to the path before widening. |
Method: widen(pen, matrix, flatness)
widen(pen, matrix, flatness)
Replaces this GraphicsPath with curves that enclose the area that is filled when this path is drawn by the specified pen.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pen | Pen | A Pen that specifies the width between the original outline of the path and the new outline this method creates. |
| matrix | Matrix | A Matrix that specifies a transform to apply to the path before widening. |
| flatness | float | A value that specifies the flatness for curves. |