Class LinearGradientBrushBase
Namespace: Aspose.Imaging.Brushes
Assembly: Aspose.Imaging.dll (25.4.0)
Represents a Aspose.Imaging.Brush with gradient capabilities and appropriate properties.
[JsonObject(MemberSerialization.OptIn)]
public abstract class LinearGradientBrushBase : TransformBrush, IDisposable
Inheritance
object ← DisposableObject ← Brush ← TransformBrush ← LinearGradientBrushBase
Derived
LinearGradientBrush , LinearMulticolorGradientBrush
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()
Constructors
LinearGradientBrushBase()
Initializes a new instance of the Aspose.Imaging.Brushes.LinearGradientBrushBase class with default parameters. The angle is 45 degrees and the rectangle is located in (0,0) with size (1,1).
protected LinearGradientBrushBase()
LinearGradientBrushBase(Point, Point)
Initializes a new instance of the Aspose.Imaging.Brushes.LinearGradientBrushBase class. The gradient rectangle is calculated from the specified points.
protected LinearGradientBrushBase(Point point1, Point point2)
Parameters
point1
Point
A Aspose.Imaging.Point structure that represents the starting point of the linear gradient.
point2
Point
A Aspose.Imaging.Point structure that represents the endpoint of the linear gradient.
LinearGradientBrushBase(PointF, PointF)
Initializes a new instance of the Aspose.Imaging.Brushes.LinearGradientBrushBase class. The gradient rectangle is calculated from the specified points.
protected LinearGradientBrushBase(PointF point1, PointF point2)
Parameters
point1
PointF
A Aspose.Imaging.PointF structure that represents the starting point of the linear gradient.
point2
PointF
A Aspose.Imaging.PointF structure that represents the endpoint of the linear gradient.
LinearGradientBrushBase(Rectangle, float, bool)
Initializes a new instance of the Aspose.Imaging.Brushes.LinearGradientBrushBase class based on a rectangle and an orientation angle.
protected LinearGradientBrushBase(Rectangle rect, float angle, bool isAngleScalable)
Parameters
rect
Rectangle
A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
angle
float
The angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.
isAngleScalable
bool
if set to true
the angle is changed during transformations applied to this Aspose.Imaging.Brushes.LinearGradientBrushBase.
LinearGradientBrushBase(RectangleF, float, bool)
Initializes a new instance of the Aspose.Imaging.Brushes.LinearGradientBrushBase class based on a rectangle, starting and ending colors, and an orientation angle.
protected LinearGradientBrushBase(RectangleF rect, float angle, bool isAngleScalable)
Parameters
rect
RectangleF
A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
angle
float
The angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.
isAngleScalable
bool
if set to true
the angle is changed during transformations with this Aspose.Imaging.Brushes.LinearGradientBrushBase.
Properties
Angle
Gets or sets the gradient angle.
public float Angle { get; set; }
Property Value
GammaCorrection
Gets or sets a value indicating whether gamma correction is enabled for this Aspose.Imaging.Brushes.LinearGradientBrushBase.
public bool GammaCorrection { get; set; }
Property Value
IsAngleScalable
Gets or sets a value indicating whether Aspose.Imaging.Brushes.LinearGradientBrushBase.Angle is changed during trasnformations with this Aspose.Imaging.Brushes.LinearGradientBrushBase.
public bool IsAngleScalable { get; set; }
Property Value
Rectangle
Gets or sets a rectangular region that defines the starting and ending points of the gradient.
public RectangleF Rectangle { get; set; }