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.4.0

Constructors

NameDescription
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

NameTypeAccessDescription
boundsRectangleFrGets or sets the object’s bounds.
figuresFigure[]rGets the path figures.
fill_modeFillModer/wGets or sets a FillMode enumeration that determines how the interiors of shapes in this GraphicsPath are filled.

Methods

NameDescription
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:

ParameterTypeDescription
figuresFigure[]The figures to initialize from.

Constructor: GraphicsPath(figures, fill_mode)

 GraphicsPath(figures, fill_mode) 

Initializes a new instance of the GraphicsPath class.

Parameters:

ParameterTypeDescription
figuresFigure[]The figures to initialize from.
fill_modeFillModeThe fill mode.

Constructor: GraphicsPath(fill_mode)

 GraphicsPath(fill_mode) 

Initializes a new instance of the GraphicsPath class.

Parameters:

ParameterTypeDescription
fill_modeFillModeThe fill mode.

Method: add_figure(figure)

 add_figure(figure) 

Adds a new figure.

Parameters:

ParameterTypeDescription
figureFigureThe figure to add.

Method: add_figures(figures)

 add_figures(figures) 

Adds new figures.

Parameters:

ParameterTypeDescription
figuresFigure[]The figures to add.

Method: add_path(adding_path)

 add_path(adding_path) 

Appends the specified GraphicsPath to this path.

Parameters:

ParameterTypeDescription
adding_pathGraphicsPathThe GraphicsPath to add.

Method: add_path(adding_path, connect)

 add_path(adding_path, connect) 

Appends the specified GraphicsPath to this path.

Parameters:

ParameterTypeDescription
adding_pathGraphicsPathThe GraphicsPath to add.
connectboolA 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

TypeDescription
GraphicsPathA 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:

ParameterTypeDescription
matrixMatrixA 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:

ParameterTypeDescription
matrixMatrixA Matrix by which to transform this GraphicsPath before flattening.
flatnessfloatSpecifies 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:

ParameterTypeDescription
matrixMatrixThe matrix to apply before bounds will be calculated.

Returns

TypeDescription
RectangleFThe estimated object’s bounds.

Method: get_bounds(matrix, pen)

 get_bounds(matrix, pen) 

Gets the object’s bounds.

Parameters:

ParameterTypeDescription
matrixMatrixThe matrix to apply before bounds will be calculated.
penPenThe pen to use for object. This can influence the object’s bounds size.

Returns

TypeDescription
RectangleFThe 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:

ParameterTypeDescription
pointPointFA PointF that specifies the location to test.
penPenThe Pen to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
pointPointA PointF that specifies the location to test.
penPenThe Pen to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
ptPointFA PointF that specifies the location to test.
penPenThe Pen to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
ptPointA PointF that specifies the location to test.
penPenThe Pen to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.
penPenThe Pen to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.
penPenThe Pen to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.
penPenThe Pen to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.
penPenThe Pen to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
pointPointFA PointF that represents the point to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
pointPointA PointF that represents the point to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
ptPointFA PointF that represents the point to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
ptPointA PointF that represents the point to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.
graphicsGraphicsThe Graphics for which to test visibility.

Returns

TypeDescription
boolThis 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:

ParameterTypeDescription
figureFigureThe figure to remove.

Method: remove_figures(figures)

 remove_figures(figures) 

Removes figures.

Parameters:

ParameterTypeDescription
figuresFigure[]The figures to remove.

Method: transform(transform)

 transform(transform) 

Applies the specified transformation to the shape.

Parameters:

ParameterTypeDescription
transformMatrixThe 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:

ParameterTypeDescription
dest_pointsPointF[]An array of PointF structures that define a parallelogram to which the rectangle defined by 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.
src_rectRectangleFA 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:

ParameterTypeDescription
dest_pointsPointF[]An array of PointF structures that define a parallelogram to which the rectangle defined by 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.
src_rectRectangleFA RectangleF that represents the rectangle that is transformed to the parallelogram defined by .
matrixMatrixA 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:

ParameterTypeDescription
dest_pointsPointF[]An array of PointF structures that defines a parallelogram to which the rectangle defined by 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.
src_rectRectangleFA RectangleF that represents the rectangle that is transformed to the parallelogram defined by .
matrixMatrixA Matrix that specifies a geometric transform to apply to the path.
warp_modeWarpModeA 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:

ParameterTypeDescription
dest_pointsPointF[]An array of PointF structures that define a parallelogram to which the rectangle defined by 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.
src_rectRectangleFA RectangleF that represents the rectangle that is transformed to the parallelogram defined by .
matrixMatrixA Matrix that specifies a geometric transform to apply to the path.
warp_modeWarpModeA WarpMode enumeration that specifies whether this warp operation uses perspective or bilinear mode.
flatnessfloatA 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:

ParameterTypeDescription
penPenA 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:

ParameterTypeDescription
penPenA Pen that specifies the width between the original outline of the path and the new outline this method creates.
matrixMatrixA 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:

ParameterTypeDescription
penPenA Pen that specifies the width between the original outline of the path and the new outline this method creates.
matrixMatrixA Matrix that specifies a transform to apply to the path before widening.
flatnessfloatA value that specifies the flatness for curves.