Table of Contents

Class LinearGradientBrushBase

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

Represents a Brush with gradient capabilities and appropriate properties.

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

Constructors

LinearGradientBrushBase()

Initializes a new instance of the 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 LinearGradientBrushBase class. The gradient rectangle is calculated from the specified points.

protected LinearGradientBrushBase(Point point1, Point point2)

Parameters

point1 Point

A Point structure that represents the starting point of the linear gradient.

point2 Point

A Point structure that represents the endpoint of the linear gradient.

LinearGradientBrushBase(PointF, PointF)

Initializes a new instance of the LinearGradientBrushBase class. The gradient rectangle is calculated from the specified points.

protected LinearGradientBrushBase(PointF point1, PointF point2)

Parameters

point1 PointF

A PointF structure that represents the starting point of the linear gradient.

point2 PointF

A PointF structure that represents the endpoint of the linear gradient.

LinearGradientBrushBase(Rectangle, float, bool)

Initializes a new instance of the LinearGradientBrushBase class based on a rectangle and an orientation angle.

protected LinearGradientBrushBase(Rectangle rect, float angle, bool isAngleScalable)

Parameters

rect Rectangle

A 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 LinearGradientBrushBase.

LinearGradientBrushBase(RectangleF, float, bool)

Initializes a new instance of the 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 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 LinearGradientBrushBase.

Properties

Angle

Gets or sets the gradient angle.

public float Angle { get; set; }

Property Value

float

The gradient angle.

GammaCorrection

Gets or sets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase.

public bool GammaCorrection { get; set; }

Property Value

bool

The value is true if gamma correction is enabled for this LinearGradientBrushBase; otherwise, false.

IsAngleScalable

Gets or sets a value indicating whether Angle is changed during trasnformations with this LinearGradientBrushBase.

public bool IsAngleScalable { get; set; }

Property Value

bool

true if Angle is changed during transformations with this LinearGradientBrushBase; otherwise, false.

Rectangle

Gets or sets a rectangular region that defines the starting and ending points of the gradient.

public RectangleF Rectangle { get; set; }

Property Value

RectangleF

A RectangleF structure that specifies the starting and ending points of the gradient.