PDFsharp-net6

XLinearGradientBrush

Namespace: PdfSharp.Drawing

Defines a Brush with a linear gradient.

public sealed class XLinearGradientBrush : XGradientBrush

Inheritance ObjectXBrushXGradientBrushXLinearGradientBrush

Properties

Transform

Gets or sets an XMatrix that defines a local geometric transform for this LinearGradientBrush.

public XMatrix Transform { get; set; }

Property Value

XMatrix

ExtendLeft

Gets or sets a value indicating whether to extend the gradient beyond its bounds.

public bool ExtendLeft { get; set; }

Property Value

Boolean

ExtendRight

Gets or sets a value indicating whether to extend the gradient beyond its bounds.

public bool ExtendRight { get; set; }

Property Value

Boolean

Constructors

XLinearGradientBrush(XPoint, XPoint, XColor, XColor)

Initializes a new instance of the XLinearGradientBrush class.

public XLinearGradientBrush(XPoint point1, XPoint point2, XColor color1, XColor color2)

Parameters

point1 XPoint

point2 XPoint

color1 XColor

color2 XColor

XLinearGradientBrush(XRect, XColor, XColor, XLinearGradientMode)

Initializes a new instance of the XLinearGradientBrush class.

public XLinearGradientBrush(XRect rect, XColor color1, XColor color2, XLinearGradientMode linearGradientMode)

Parameters

rect XRect

color1 XColor

color2 XColor

linearGradientMode XLinearGradientMode

Methods

TranslateTransform(Double, Double)

Translates the brush with the specified offset.

public void TranslateTransform(double dx, double dy)

Parameters

dx Double

dy Double

TranslateTransform(Double, Double, XMatrixOrder)

Translates the brush with the specified offset.

public void TranslateTransform(double dx, double dy, XMatrixOrder order)

Parameters

dx Double

dy Double

order XMatrixOrder

ScaleTransform(Double, Double)

Scales the brush with the specified scalars.

public void ScaleTransform(double sx, double sy)

Parameters

sx Double

sy Double

ScaleTransform(Double, Double, XMatrixOrder)

Scales the brush with the specified scalars.

public void ScaleTransform(double sx, double sy, XMatrixOrder order)

Parameters

sx Double

sy Double

order XMatrixOrder

RotateTransform(Double)

Rotates the brush with the specified angle.

public void RotateTransform(double angle)

Parameters

angle Double

RotateTransform(Double, XMatrixOrder)

Rotates the brush with the specified angle.

public void RotateTransform(double angle, XMatrixOrder order)

Parameters

angle Double

order XMatrixOrder

MultiplyTransform(XMatrix)

Multiply the brush transformation matrix with the specified matrix.

public void MultiplyTransform(XMatrix matrix)

Parameters

matrix XMatrix

MultiplyTransform(XMatrix, XMatrixOrder)

Multiply the brush transformation matrix with the specified matrix.

public void MultiplyTransform(XMatrix matrix, XMatrixOrder order)

Parameters

matrix XMatrix

order XMatrixOrder

ResetTransform()

Resets the brush transformation matrix with identity matrix.

public void ResetTransform()