PathGradientBrush 类

Summary: Encapsulates a Brush object with a gradient. This class cannot be inherited.

Module: aspose.imaging.brushes

Full Name: aspose.imaging.brushes.PathGradientBrush

Inheritance: PathGradientBrushBase

Constructors

Name描述
PathGradientBrush(path)初始化 PathGradientBrush 类的新实例
PathGradientBrush(path_points)初始化 PathGradientBrush 类的新实例
PathGradientBrush(path_points)初始化 PathGradientBrush 类的新实例
PathGradientBrush(path_points, wrap_mode)初始化 PathGradientBrush 类的新实例
PathGradientBrush(path_points, wrap_mode)初始化 PathGradientBrush 类的新实例

Properties

NameTypeAccess描述
blendBlendr/w获取或设置一个 Blend ,它指定用于定义渐变自定义衰减的位置信息和因子。
center_colorColorr/w获取或设置路径渐变中心的颜色。
center_pointPointFr/w获取或设置路径渐变的中心点。
disposedboolr获取一个值,指示此实例是否已释放。
focus_scalesPointFr/w获取或设置渐变衰减的焦点。
graphics_pathGraphicsPathr获取此画笔所基于的图形路径。
interpolation_colorsColorBlendr/w获取或设置一个 ColorBlend,用于定义多颜色线性渐变。
is_transform_changedboolr获取一个值,指示变换是否以某种方式被更改。例如设置变换矩阵或
调用任何修改变换矩阵的方法。此属性为向后兼容 GDI+ 而引入。
opacityfloatr/w获取或设置画笔的不透明度。该值应在 0 到 1 之间。0 表示画笔完全可见,1 表示画笔完全不透明。
path_pointsPointF[]r获取此画笔所基于的路径点。
surround_colorsColor[]r/w获取或设置一个颜色数组,这些颜色对应于此 PathGradientBrush 填充的路径中的点。
transformMatrixr/w获取或设置一个 Matrix 副本,用于定义此 TransformBrush 的局部几何变换。
wrap_modeWrapModer/w获取或设置一个指示此 TransformBrush 的包装模式的 WrapMode 枚举。

Methods

Name描述
create_with_path(path)使用指定的路径初始化 PathGradientBrush 类的新实例。
create_with_points(path_points)使用指定的点初始化 PathGradientBrush 类的新实例。
create_with_points_f(path_points)使用指定的点初始化 PathGradientBrush 类的新实例。
create_with_points_f_wrap_mode(path_points, wrap_mode)使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。
create_with_points_wrap_mode(path_points, wrap_mode)使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。
deep_clone()创建当前 Brush 的新深度克隆。
multiply_transform(matrix)将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 相乘,并在前面预置指定的 Matrix
multiply_transform(matrix, order)将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 按指定顺序相乘。
reset_transform()TransformBrush.transform 属性重置为单位矩阵。
rotate_transform(angle)按指定量旋转本地几何变换。此方法将在变换前预置旋转。
rotate_transform(angle, order)按指定量并按指定顺序旋转本地几何变换。
scale_transform(sx, sy)按指定的比例缩放本地几何变换。此方法将在变换前预置缩放矩阵。
scale_transform(sx, sy, order)按指定的比例并按指定顺序缩放本地几何变换。
set_blend_triangular_shape(focus)创建一个以中心颜色为起点、线性衰减至一种周围颜色的渐变。
set_blend_triangular_shape(focus, scale)创建一个以中心颜色为起点、线性衰减至每种周围颜色的渐变。
set_sigma_bell_shape(focus)创建一个渐变画刷,使颜色从路径中心向外变化至路径边界。颜色之间的过渡基于钟形曲线。
set_sigma_bell_shape(focus, scale)创建一个渐变画刷,使颜色从路径中心向外变化至路径边界。颜色之间的过渡基于钟形曲线。
translate_transform(dx, dy)按指定的尺寸平移本地几何变换。此方法将在变换前预置平移。
translate_transform(dx, dy, order)按指定的尺寸并按指定顺序平移本地几何变换。

Constructor: PathGradientBrush(path)

 PathGradientBrush(path) 

初始化 PathGradientBrush 类的新实例

Parameters:

参数TypeDescription
pathGraphicsPath

Constructor: PathGradientBrush(path_points)

 PathGradientBrush(path_points) 

初始化 PathGradientBrush 类的新实例

Parameters:

参数TypeDescription
path_pointsPointF[]

Constructor: PathGradientBrush(path_points)

 PathGradientBrush(path_points) 

初始化 PathGradientBrush 类的新实例

Parameters:

参数TypeDescription
path_pointsPoint[]

Constructor: PathGradientBrush(path_points, wrap_mode)

 PathGradientBrush(path_points, wrap_mode) 

初始化 PathGradientBrush 类的新实例

Parameters:

参数TypeDescription
path_pointsPointF[]
wrap_modeWrapMode

Constructor: PathGradientBrush(path_points, wrap_mode)

 PathGradientBrush(path_points, wrap_mode) 

初始化 PathGradientBrush 类的新实例

Parameters:

参数TypeDescription
path_pointsPoint[]
wrap_modeWrapMode

Method: create_with_path(path) [static]

 create_with_path(path) 

使用指定的路径初始化 PathGradientBrush 类的新实例。

Parameters:

参数TypeDescription
pathGraphicsPath定义此 GraphicsPath 所定义的、由此 PathGradientBrush 填充的区域。

Returns

TypeDescription
PathGradientBrush

Method: create_with_points(path_points) [static]

 create_with_points(path_points) 

使用指定的点初始化 PathGradientBrush 类的新实例。

Parameters:

参数TypeDescription
path_pointsPoint[]一个由 PointF 结构组成的数组,表示构成路径顶点的点。

Returns

TypeDescription
PathGradientBrush

Method: create_with_points_f(path_points) [static]

 create_with_points_f(path_points) 

使用指定的点初始化 PathGradientBrush 类的新实例。

Parameters:

参数TypeDescription
path_pointsPointF[]一个由 PointF 结构组成的数组,表示构成路径顶点的点。

Returns

TypeDescription
PathGradientBrush

Method: create_with_points_f_wrap_mode(path_points, wrap_mode) [static]

 create_with_points_f_wrap_mode(path_points, wrap_mode) 

使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。

Parameters:

参数TypeDescription
path_pointsPointF[]一个由 PointF 结构组成的数组,表示构成路径顶点的点。
wrap_modeWrapMode指定使用此 WrapMode 如何平铺使用此 PathGradientBrush 绘制的填充。

Returns

TypeDescription
PathGradientBrush

Method: create_with_points_wrap_mode(path_points, wrap_mode) [static]

 create_with_points_wrap_mode(path_points, wrap_mode) 

使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。

Parameters:

参数TypeDescription
path_pointsPoint[]一个由 Point 结构组成的数组,表示构成路径顶点的点。
wrap_modeWrapMode指定使用此 WrapMode 如何平铺使用此 PathGradientBrush 绘制的填充。

Returns

TypeDescription
PathGradientBrush

Method: deep_clone()

 deep_clone() 

创建当前 Brush 的新深度克隆。

Returns

TypeDescription
Brush一个新的 Brush,它是此 Brush 实例的深度克隆。

Method: multiply_transform(matrix)

 multiply_transform(matrix) 

将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 相乘,并在前面预置指定的 Matrix

Parameters:

参数TypeDescription
matrixMatrix用于乘以几何变换的 Matrix

Method: multiply_transform(matrix, order)

 multiply_transform(matrix, order) 

将表示此 LinearGradientBrush 的本地几何变换的 Matrix 与指定的 Matrix 按指定顺序相乘。

Parameters:

参数TypeDescription
matrixMatrix用于乘以几何变换的 Matrix
orderMatrixOrder指定两个矩阵相乘顺序的 MatrixOrder

Method: rotate_transform(angle)

 rotate_transform(angle) 

按指定量旋转本地几何变换。此方法将在变换前预置旋转。

Parameters:

参数TypeDescription
角度float旋转角度。

Method: rotate_transform(angle, order)

 rotate_transform(angle, order) 

按指定量并按指定顺序旋转本地几何变换。

Parameters:

参数TypeDescription
角度float旋转角度。
orderMatrixOrder指定是追加还是预置旋转矩阵的 MatrixOrder

Method: scale_transform(sx, sy)

 scale_transform(sx, sy) 

按指定的比例缩放本地几何变换。此方法将在变换前预置缩放矩阵。

Parameters:

参数TypeDescription
sxfloat在 x 轴方向上缩放变换的量。
syfloat在 y 轴方向上缩放变换的量。

Method: scale_transform(sx, sy, order)

 scale_transform(sx, sy, order) 

按指定的比例并按指定顺序缩放本地几何变换。

Parameters:

参数TypeDescription
sxfloat在 x 轴方向上缩放变换的量。
syfloat在 y 轴方向上缩放变换的量。
orderMatrixOrder一个 MatrixOrder 用于指定是追加还是预先追加缩放矩阵。

Method: set_blend_triangular_shape(focus)

 set_blend_triangular_shape(focus) 

创建一个以中心颜色为起点、线性衰减至一种周围颜色的渐变。

Parameters:

参数TypeDescription
焦点float一个取值范围为 0 到 1 的值,用于指定沿从路径中心到路径边界的任意径向,中心颜色在最高强度时的位置。取值为 1(默认)时,最高强度位于路径的中心。

Method: set_blend_triangular_shape(focus, scale)

 set_blend_triangular_shape(focus, scale) 

创建一个以中心颜色为起点、线性衰减至每种周围颜色的渐变。

Parameters:

参数TypeDescription
焦点float一个取值范围为 0 到 1 的值,用于指定沿从路径中心到路径边界的任意径向,中心颜色在最高强度时的位置。取值为 1(默认)时,最高强度位于路径的中心。
比例float一个取值范围为 0 到 1 的值,用于指定中心颜色与边界颜色混合时的最大强度。取值为 1 时会产生中心颜色的最高可能强度,这是默认值。

Method: set_sigma_bell_shape(focus)

 set_sigma_bell_shape(focus) 

创建一个渐变画刷,使颜色从路径中心向外变化至路径边界。颜色之间的过渡基于钟形曲线。

Parameters:

参数TypeDescription
焦点float一个取值范围为 0 到 1 的值,用于指定沿从路径中心到路径边界的任意径向,中心颜色在最高强度时的位置。取值为 1(默认)时,最高强度位于路径的中心。

Method: set_sigma_bell_shape(focus, scale)

 set_sigma_bell_shape(focus, scale) 

创建一个渐变画刷,使颜色从路径中心向外变化至路径边界。颜色之间的过渡基于钟形曲线。

Parameters:

参数TypeDescription
焦点float一个取值范围为 0 到 1 的值,用于指定沿从路径中心到路径边界的任意径向,中心颜色在最高强度时的位置。取值为 1(默认)时,最高强度位于路径的中心。
比例float一个取值范围为 0 到 1 的值,用于指定中心颜色与边界颜色混合时的最大强度。取值为 1 时会产生中心颜色的最高可能强度,这是默认值。

Method: translate_transform(dx, dy)

 translate_transform(dx, dy) 

按指定的尺寸平移本地几何变换。此方法将在变换前预置平移。

Parameters:

参数TypeDescription
dxfloatx 方向的平移值。
dyfloaty 方向的平移值。

Method: translate_transform(dx, dy, order)

 translate_transform(dx, dy, order) 

按指定的尺寸并按指定顺序平移本地几何变换。

Parameters:

参数TypeDescription
dxfloatx 方向的平移值。
dyfloaty 方向的平移值。
orderMatrixOrder应用平移的顺序(预先追加或追加)。