Class PathGradientBrushBase
Namespace: Aspose.Imaging.Brushes
Assembly: Aspose.Imaging.dll (25.4.0)
Represents a Aspose.Imaging.Brush with base path gradient functionality.
[JsonObject(MemberSerialization.OptIn)]
public abstract class PathGradientBrushBase : TransformBrush, IDisposable
Inheritance
object ← DisposableObject ← Brush ← TransformBrush ← PathGradientBrushBase
Derived
PathGradientBrush, PathMulticolorGradientBrush
Implements
Inherited Members
TransformBrush.ResetTransform(), TransformBrush.MultiplyTransform(Matrix), TransformBrush.MultiplyTransform(Matrix, MatrixOrder), TransformBrush.TranslateTransform(float, float), TransformBrush.TranslateTransform(float, float, MatrixOrder), TransformBrush.ScaleTransform(float, float), TransformBrush.ScaleTransform(float, float, MatrixOrder), TransformBrush.RotateTransform(float), TransformBrush.RotateTransform(float, MatrixOrder), TransformBrush.WrapMode, TransformBrush.Transform, TransformBrush.IsTransformChanged, Brush.DeepClone(), Brush.Equals(object), Brush.GetHashCode(), Brush.Equals(Brush), Brush.Opacity, DisposableObject.Dispose(), DisposableObject.ReleaseManagedResources(), DisposableObject.ReleaseUnmanagedResources(), DisposableObject.VerifyNotDisposed(), DisposableObject.Disposed, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Note that when creating the Aspose.Imaging.Brushes.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 Aspose.Imaging.Brushes.PathGradientBrushBase. The GDI+ implementation throws an System.OutOfMemoryException when passing in empty arrays or points set having the same coordinates. The Aspose.Imaging.Brushes.PathGradientBrushBase throws an exception when points array contain less than 2 points, the System.ArgumentException is thrown rather than System.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(PointF[])
Initializes a new instance of the Aspose.Imaging.Brushes.PathGradientBrushBase class with the specified points.
[JsonConstructor]
protected PathGradientBrushBase(PointF[] pathPoints)
Parameters
pathPoints
PointF[]
An array of Aspose.Imaging.PointF structures that represents the points that make up the vertices of the path.
PathGradientBrushBase(PointF[], WrapMode)
Initializes a new instance of the Aspose.Imaging.Brushes.PathGradientBrushBase class with the specified points and wrap mode.
protected PathGradientBrushBase(PointF[] pathPoints, WrapMode wrapMode)
Parameters
pathPoints
PointF[]
An array of Aspose.Imaging.PointF structures that represents the points that make up the vertices of the path.
wrapMode
WrapMode
A Aspose.Imaging.WrapMode that specifies how fills drawn with this Aspose.Imaging.Brushes.PathGradientBrushBase are tiled.
PathGradientBrushBase(Point[])
Initializes a new instance of the Aspose.Imaging.Brushes.PathGradientBrushBase class with the specified points.
protected PathGradientBrushBase(Point[] pathPoints)
Parameters
pathPoints
Point[]
An array of Aspose.Imaging.Point structures that represents the points that make up the vertices of the path.
PathGradientBrushBase(Point[], WrapMode)
Initializes a new instance of the Aspose.Imaging.Brushes.PathGradientBrushBase class with the specified points and wrap mode.
protected PathGradientBrushBase(Point[] pathPoints, WrapMode wrapMode)
Parameters
pathPoints
Point[]
An array of Aspose.Imaging.Point structures that represents the points that make up the vertices of the path.
wrapMode
WrapMode
A Aspose.Imaging.WrapMode that specifies how fills drawn with this Aspose.Imaging.Brushes.PathGradientBrushBase are tiled.
PathGradientBrushBase(GraphicsPath)
Initializes a new instance of the Aspose.Imaging.Brushes.PathGradientBrushBase class with the specified path.
protected PathGradientBrushBase(GraphicsPath path)
Parameters
path
GraphicsPath
The Aspose.Imaging.Brushes.PathGradientBrushBase.GraphicsPath that defines the area filled by this Aspose.Imaging.Brushes.PathGradientBrushBase.
Properties
CenterPoint
Gets or sets the center point of the path gradient.
public PointF CenterPoint { get; set; }
Property Value
FocusScales
Gets or sets the focus point for the gradient falloff.
public PointF FocusScales { get; set; }
Property Value
GraphicsPath
Gets the graphics path this brush was build upon.
public GraphicsPath GraphicsPath { get; }
Property Value
PathPoints
Gets the path points this brush was build upon.
public PointF[] PathPoints { get; }
Property Value
PointF[]