Table of Contents

Class PathGradientBrushBase

Namespace
Aspose.Imaging.Brushes
Assembly
Aspose.Imaging.dll

Represents a Brush with base path gradient functionality.

public abstract class PathGradientBrushBase : TransformBrush, IDisposable
Inheritance
PathGradientBrushBase
Implements
Derived
Inherited Members

Remarks

Note that when creating the PathGradientBrushBase class it should be initialized with 2 points at least. The internal path created will always be a closed figure, the last point connects the first point. That shape is filled with this PathGradientBrushBase. The GDI+ implementation throws an OutOfMemoryException when passing in empty arrays or points set having the same coordinates. The PathGradientBrushBase throws an exception when points array contain less than 2 points, the ArgumentException is thrown rather than OutOfMemoryException when points array is unacceptable. The center point is calculated as a center of mass for the passed in points by default. A user can change this point later. The focus scales is an empty point (0.0, 0.0) by default.

Constructors

PathGradientBrushBase(GraphicsPath)

Initializes a new instance of the PathGradientBrushBase class with the specified path.

protected PathGradientBrushBase(GraphicsPath path)

Parameters

path GraphicsPath

The GraphicsPath that defines the area filled by this PathGradientBrushBase.

PathGradientBrushBase(PointF[])

Initializes a new instance of the PathGradientBrushBase class with the specified points.

protected PathGradientBrushBase(PointF[] pathPoints)

Parameters

pathPoints PointF[]

An array of PointF structures that represents the points that make up the vertices of the path.

PathGradientBrushBase(PointF[], WrapMode)

Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.

protected PathGradientBrushBase(PointF[] pathPoints, WrapMode wrapMode)

Parameters

pathPoints PointF[]

An array of PointF structures that represents the points that make up the vertices of the path.

wrapMode WrapMode

A WrapMode that specifies how fills drawn with this PathGradientBrushBase are tiled.

PathGradientBrushBase(Point[])

Initializes a new instance of the PathGradientBrushBase class with the specified points.

protected PathGradientBrushBase(Point[] pathPoints)

Parameters

pathPoints Point[]

An array of Point structures that represents the points that make up the vertices of the path.

PathGradientBrushBase(Point[], WrapMode)

Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.

protected PathGradientBrushBase(Point[] pathPoints, WrapMode wrapMode)

Parameters

pathPoints Point[]

An array of Point structures that represents the points that make up the vertices of the path.

wrapMode WrapMode

A WrapMode that specifies how fills drawn with this PathGradientBrushBase are tiled.

Properties

CenterPoint

Gets or sets the center point of the path gradient.

public PointF CenterPoint { get; set; }

Property Value

PointF

A PointF that represents the center point of the path gradient.

FocusScales

Gets or sets the focus point for the gradient falloff.

public PointF FocusScales { get; set; }

Property Value

PointF

A PointF that represents the focus point for the gradient falloff.

GraphicsPath

Gets the graphics path this brush was build upon.

public GraphicsPath GraphicsPath { get; }

Property Value

GraphicsPath

The graphics path.

PathPoints

Gets the path points this brush was build upon.

public PointF[] PathPoints { get; }

Property Value

PointF[]

The path points.