LinearMulticolorGradientBrush Class
Summary: Represents a Brush with linear gradient defined by multiple colors and appropriate positions. This class cannot be inherited.
Module: aspose.imaging.brushes
Full Name: aspose.imaging.brushes.LinearMulticolorGradientBrush
Inheritance: LinearGradientBrushBase
Constructors
Name | Description |
---|---|
LinearMulticolorGradientBrush() | Initializes a new instance of the LinearMulticolorGradientBrush class with default parameters. The starting color is black, the ending color is white, the angle is 45 degrees and the rectangle is located in (0,0) with size (1,1). |
LinearMulticolorGradientBrush(point1, point2) | Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points. |
LinearMulticolorGradientBrush(point1, point2) | Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points. |
LinearMulticolorGradientBrush(rect, angle) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
LinearMulticolorGradientBrush(rect, angle) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
Properties
Name | Type | Access | Description |
---|---|---|---|
angle | float | r/w | Gets or sets the gradient angle. |
disposed | bool | r | Gets a value indicating whether this instance is disposed. |
gamma_correction | bool | r/w | Gets or sets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase. |
interpolation_colors | ColorBlend | r/w | Gets or sets a ColorBlend that defines a multicolor linear gradient. |
is_angle_scalable | bool | r/w | Gets or sets a value indicating whether LinearGradientBrushBase.angle is changed during trasnformations with this LinearGradientBrushBase. |
is_transform_changed | bool | r | Gets a value indicating whether transformations were changed in some way. For example setting the transformation matrix or calling any of the methods altering the transformation matrix. The property is introduced for backward compatibility with GDI+. |
opacity | float | r/w | Gets or sets the brush opacity. The value should be between 0 and 1. Value of 0 means that brush is fully visible, value of 1 means the brush is fully opaque. |
rectangle | RectangleF | r/w | Gets or sets a rectangular region that defines the starting and ending points of the gradient. |
transform | Matrix | r/w | Gets or sets a copy Matrix that defines a local geometric transform for this TransformBrush. |
wrap_mode | WrapMode | r/w | Gets or sets a WrapMode enumeration that indicates the wrap mode for this TransformBrush. |
Methods
Name | Description |
---|---|
create_with_points(point1, point2) | Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points. |
create_with_points_f(point1, point2) | Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points. |
create_with_rect(rect, angle) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
create_with_rect_angle_scalable(rect, angle, is_angle_scalable) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
create_with_rect_f(rect, angle) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
create_with_rect_f_angle_scalable(rect, angle, is_angle_scalable) | Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle. |
deep_clone() | Creates a new deep clone of the current Brush. |
multiply_transform(matrix) | Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix by prepending the specified Matrix. |
multiply_transform(matrix, order) | Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix in the specified order. |
reset_transform() | Resets the TransformBrush.transform property to identity. |
rotate_transform(angle) | Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform. |
rotate_transform(angle, order) | Rotates the local geometric transform by the specified amount in the specified order. |
scale_transform(sx, sy) | Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform. |
scale_transform(sx, sy, order) | Scales the local geometric transform by the specified amounts in the specified order. |
translate_transform(dx, dy) | Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform. |
translate_transform(dx, dy, order) | Translates the local geometric transform by the specified dimensions in the specified order. |
Constructor: LinearMulticolorGradientBrush()
LinearMulticolorGradientBrush()
Initializes a new instance of the LinearMulticolorGradientBrush class with default parameters.
The starting color is black, the ending color is white, the angle is 45 degrees and the rectangle is located in (0,0) with size (1,1).
Constructor: LinearMulticolorGradientBrush(point1, point2)
LinearMulticolorGradientBrush(point1, point2)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Constructor: LinearMulticolorGradientBrush(point1, point2)
LinearMulticolorGradientBrush(point1, point2)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
point1 | PointF | A Point structure that represents the starting point of the linear gradient. |
point2 | PointF | A Point structure that represents the endpoint of the linear gradient. |
Constructor: LinearMulticolorGradientBrush(rect, angle)
LinearMulticolorGradientBrush(rect, angle)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Constructor: LinearMulticolorGradientBrush(rect, angle)
LinearMulticolorGradientBrush(rect, angle)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Constructor: LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
is_angle_scalable | bool | if set to |
Constructor: LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
is_angle_scalable | bool | if set to |
Method: create_with_points(point1, point2) [static]
create_with_points(point1, point2)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: create_with_points_f(point1, point2) [static]
create_with_points_f(point1, point2)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: create_with_rect(rect, angle) [static]
create_with_rect(rect, angle)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: create_with_rect_angle_scalable(rect, angle, is_angle_scalable) [static]
create_with_rect_angle_scalable(rect, angle, is_angle_scalable)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
is_angle_scalable | bool | if set to |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: create_with_rect_f(rect, angle) [static]
create_with_rect_f(rect, angle)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: create_with_rect_f_angle_scalable(rect, angle, is_angle_scalable) [static]
create_with_rect_f_angle_scalable(rect, angle, is_angle_scalable)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
Parameters:
Parameter | Type | Description |
---|---|---|
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. |
is_angle_scalable | bool | if set to |
Returns
Type | Description |
---|---|
LinearMulticolorGradientBrush |
Method: deep_clone()
deep_clone()
Creates a new deep clone of the current Brush.
Returns
Type | Description |
---|---|
Brush | A new Brush which is the deep clone of this Brush instance. |
Method: multiply_transform(matrix)
multiply_transform(matrix)
Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix by prepending the specified Matrix.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The Matrix by which to multiply the geometric transform. |
Method: multiply_transform(matrix, order)
multiply_transform(matrix, order)
Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The Matrix by which to multiply the geometric transform. |
order | MatrixOrder | A MatrixOrder that specifies in which order to multiply the two matrices. |
Method: rotate_transform(angle)
rotate_transform(angle)
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle of rotation. |
Method: rotate_transform(angle, order)
rotate_transform(angle, order)
Rotates the local geometric transform by the specified amount in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle of rotation. |
order | MatrixOrder | A MatrixOrder that specifies whether to append or prepend the rotation matrix. |
Method: scale_transform(sx, sy)
scale_transform(sx, sy)
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
Parameters:
Parameter | Type | Description |
---|---|---|
sx | float | The amount by which to scale the transform in the x-axis direction. |
sy | float | The amount by which to scale the transform in the y-axis direction. |
Method: scale_transform(sx, sy, order)
scale_transform(sx, sy, order)
Scales the local geometric transform by the specified amounts in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
sx | float | The amount by which to scale the transform in the x-axis direction. |
sy | float | The amount by which to scale the transform in the y-axis direction. |
order | MatrixOrder | A MatrixOrder that specifies whether to append or prepend the scaling matrix. |
Method: translate_transform(dx, dy)
translate_transform(dx, dy)
Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | float | The value of the translation in x. |
dy | float | The value of the translation in y. |
Method: translate_transform(dx, dy, order)
translate_transform(dx, dy, order)
Translates the local geometric transform by the specified dimensions in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | float | The value of the translation in x. |
dy | float | The value of the translation in y. |
order | MatrixOrder | The order (prepend or append) in which to apply the translation. |