LinearMulticolorGradientBrush 类
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 | 描述 |
|---|---|
| LinearMulticolorGradientBrush() | 使用默认参数初始化 LinearMulticolorGradientBrush 类的新实例。 起始颜色为黑色,结束颜色为白色,角度为 45 度,矩形位于 (0,0),大小为 (1,1)。 |
| LinearMulticolorGradientBrush(point1, point2) | 使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。 |
| LinearMulticolorGradientBrush(point1, point2) | 使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。 |
| LinearMulticolorGradientBrush(rect, angle) | 基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。 |
| LinearMulticolorGradientBrush(rect, angle) | 基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。 |
| LinearMulticolorGradientBrush(rect, angle, is_angle_scalable) | 基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。 |
| LinearMulticolorGradientBrush(rect, angle, is_angle_scalable) | 基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。 |
Properties
| Name | Type | Access | 描述 |
|---|---|---|---|
| 角度 | float | r/w | 获取或设置渐变角度。 |
| disposed | bool | r | 获取一个值,指示此实例是否已释放。 |
| gamma_correction | bool | r/w | 获取或设置一个值,指示是否为此 LinearGradientBrushBase 启用了伽马校正。 |
| interpolation_colors | ColorBlend | r/w | 获取或设置一个 ColorBlend,用于定义多颜色线性渐变。 |
| is_angle_scalable | bool | r/w | 获取或设置一个值,指示在使用此 LinearGradientBrushBase 进行变换时,是否更改了 LinearGradientBrushBase.angle。 |
| is_transform_changed | bool | r | 获取一个值,指示变换是否以某种方式被更改。例如设置变换矩阵或 调用任何修改变换矩阵的方法。此属性为向后兼容 GDI+ 而引入。 |
| opacity | float | r/w | 获取或设置画笔的不透明度。该值应在 0 到 1 之间。0 表示画笔完全可见,1 表示画笔完全不透明。 |
| rectangle | RectangleF | r/w | 获取或设置定义渐变起始和结束点的矩形区域。 |
| transform | Matrix | r/w | 获取或设置一个 Matrix 副本,用于定义此 TransformBrush 的局部几何变换。 |
| wrap_mode | WrapMode | r/w | 获取或设置一个指示此 TransformBrush 的包装模式的 WrapMode 枚举。 |
Methods
Constructor: LinearMulticolorGradientBrush()
LinearMulticolorGradientBrush()
使用默认参数初始化 LinearMulticolorGradientBrush 类的新实例。
起始颜色为黑色,结束颜色为白色,角度为 45 度,矩形位于 (0,0),大小为 (1,1)。
Constructor: LinearMulticolorGradientBrush(point1, point2)
LinearMulticolorGradientBrush(point1, point2)
使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point1 | Point | 表示线性渐变起始点的 Point 结构。 |
| point2 | Point | 表示线性渐变终点的 Point 结构。 |
Constructor: LinearMulticolorGradientBrush(point1, point2)
LinearMulticolorGradientBrush(point1, point2)
使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point1 | PointF | 表示线性渐变起始点的 Point 结构。 |
| point2 | PointF | 表示线性渐变终点的 Point 结构。 |
Constructor: LinearMulticolorGradientBrush(rect, angle)
LinearMulticolorGradientBrush(rect, angle)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | Rectangle | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
Constructor: LinearMulticolorGradientBrush(rect, angle)
LinearMulticolorGradientBrush(rect, angle)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | RectangleF | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
Constructor: LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | Rectangle | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
| is_angle_scalable | bool | 如果设置为 |
Constructor: LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
LinearMulticolorGradientBrush(rect, angle, is_angle_scalable)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | RectangleF | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
| is_angle_scalable | bool | 如果设置为 |
Method: create_with_points(point1, point2) [static]
create_with_points(point1, point2)
使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point1 | Point | 表示线性渐变起始点的 Point 结构。 |
| point2 | Point | 表示线性渐变终点的 Point 结构。 |
Returns
| Type | Description |
|---|---|
| LinearMulticolorGradientBrush |
Method: create_with_points_f(point1, point2) [static]
create_with_points_f(point1, point2)
使用指定的点初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point1 | PointF | 表示线性渐变起始点的 PointF 结构。 |
| point2 | PointF | 表示线性渐变终点的 PointF 结构。 |
Returns
| Type | Description |
|---|---|
| LinearMulticolorGradientBrush |
Method: create_with_rect(rect, angle) [static]
create_with_rect(rect, angle)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | Rectangle | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
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)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | Rectangle | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
| is_angle_scalable | bool | 如果设置为 |
Returns
| Type | Description |
|---|---|
| LinearMulticolorGradientBrush |
Method: create_with_rect_f(rect, angle) [static]
create_with_rect_f(rect, angle)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | RectangleF | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
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)
基于矩形和方向角初始化 LinearMulticolorGradientBrush 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rect | RectangleF | 指定线性渐变边界的 RectangleF 结构。 |
| 角度 | float | 梯度方向线相对于 x 轴顺时针测量的角度(以度为单位)。 |
| is_angle_scalable | bool | 如果设置为 |
Returns
| Type | Description |
|---|---|
| LinearMulticolorGradientBrush |
Method: deep_clone()
deep_clone()
创建当前 Brush 的新深度克隆。
Returns
| Type | Description |
|---|---|
| Brush | 一个新的 Brush,它是此 Brush 实例的深度克隆。 |
Method: multiply_transform(matrix)
multiply_transform(matrix)
将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 相乘,并在前面预置指定的 Matrix。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| matrix | Matrix | 用于乘以几何变换的 Matrix。 |
Method: multiply_transform(matrix, order)
multiply_transform(matrix, order)
将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 按指定顺序相乘。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| matrix | Matrix | 用于乘以几何变换的 Matrix。 |
| order | MatrixOrder | 指定两个矩阵相乘顺序的 MatrixOrder。 |
Method: rotate_transform(angle)
rotate_transform(angle)
按指定量旋转本地几何变换。此方法将在变换前预置旋转。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| 角度 | float | 旋转角度。 |
Method: rotate_transform(angle, order)
rotate_transform(angle, order)
按指定量并按指定顺序旋转本地几何变换。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| 角度 | float | 旋转角度。 |
| order | MatrixOrder | 指定是追加还是预置旋转矩阵的 MatrixOrder。 |
Method: scale_transform(sx, sy)
scale_transform(sx, sy)
按指定的比例缩放本地几何变换。此方法将在变换前预置缩放矩阵。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| sx | float | 在 x 轴方向上缩放变换的量。 |
| sy | float | 在 y 轴方向上缩放变换的量。 |
Method: scale_transform(sx, sy, order)
scale_transform(sx, sy, order)
按指定的比例并按指定顺序缩放本地几何变换。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| sx | float | 在 x 轴方向上缩放变换的量。 |
| sy | float | 在 y 轴方向上缩放变换的量。 |
| order | MatrixOrder | 一个 MatrixOrder 用于指定是追加还是预先追加缩放矩阵。 |
Method: translate_transform(dx, dy)
translate_transform(dx, dy)
按指定的尺寸平移本地几何变换。此方法将在变换前预置平移。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| dx | float | x 方向的平移值。 |
| dy | float | y 方向的平移值。 |
Method: translate_transform(dx, dy, order)
translate_transform(dx, dy, order)
按指定的尺寸并按指定顺序平移本地几何变换。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| dx | float | x 方向的平移值。 |
| dy | float | y 方向的平移值。 |
| order | MatrixOrder | 应用平移的顺序(预先追加或追加)。 |