PathGradientBrush
Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.Brush, com.aspose.imaging.brushes.TransformBrush, com.aspose.imaging.brushes.PathGradientBrushBase
public final class PathGradientBrush extends PathGradientBrushBase
封装一个带有渐变的 Aspose.Imaging.Brush 对象。此类不可被继承。
默认情况下,中心颜色为白色。用户可以在以后随时更改此值。
默认情况下,环绕颜色数组通过包含白色的单个元素进行初始化。环绕颜色以后可以更改,但在设置环绕颜色时至少需要一个元素。
有关其初始化的更多详细信息,请参阅 Blend。
构造函数
| 构造函数 | 描述 |
|---|---|
| PathGradientBrush(PointF[] points) | 使用指定的点初始化 PathGradientBrush 类的新实例。 |
| PathGradientBrush(PointF[] points, int wrapMode) | 使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。 |
| PathGradientBrush(Point[] points) | 使用指定的点初始化 PathGradientBrush 类的新实例。 |
| PathGradientBrush(Point[] points, int wrapMode) | 使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。 |
| PathGradientBrush(GraphicsPath path) | 使用指定的路径初始化 PathGradientBrush 类的新实例。 |
方法
| 方法 | 描述 |
|---|---|
| getInterpolationColors() | 获取定义多色线性渐变的 com.aspose.imaging.ColorBlend。 |
| setInterpolationColors(ColorBlend value) | 设置定义多色线性渐变的 com.aspose.imaging.ColorBlend。 |
| getCenterColor() | 获取路径渐变中心的颜色。 |
| setCenterColor(Color value) | 设置路径渐变中心的颜色。 |
| getSurroundColors() | 获取与此 PathGradientBrush 填充的路径中的点对应的颜色数组。 |
| setSurroundColors(Color[] value) | 设置与此 PathGradientBrush 填充的路径中的点对应的颜色数组。 |
| getBlend() | 获取一个 Aspose.Imaging.Blend,它指定用于定义渐变自定义衰减的位置信息和因子。 |
| setBlend(Blend value) | 设置一个 Aspose.Imaging.Blend,它指定用于定义渐变自定义衰减的位置信息和因子。 |
| setSigmaBellShape(float focus) | 创建一种渐变画刷,从路径中心向路径边界逐渐改变颜色。 |
| setSigmaBellShape(float focus, float scale) | 创建一种渐变画刷,从路径中心向路径边界逐渐改变颜色。 |
| setBlendTriangularShape(float focus) | 创建一种渐变,以中心颜色和线性衰减到单个环绕颜色。 |
| setBlendTriangularShape(float focus, float scale) | 创建一种渐变,以中心颜色和线性衰减到每个环绕颜色。 |
PathGradientBrush(PointF[] points)
public PathGradientBrush(PointF[] points)
使用指定的点初始化 PathGradientBrush 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | PointF[] | Aspose.Imaging.PointF 结构数组,表示构成路径顶点的点。 |
PathGradientBrush(PointF[] points, int wrapMode)
public PathGradientBrush(PointF[] points, int wrapMode)
使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | PointF[] | Aspose.Imaging.PointF 结构数组,表示构成路径顶点的点。 |
| wrapMode | int | Aspose.Imaging.WrapMode,指定使用此 PathGradientBrush 绘制的填充如何平铺。 |
PathGradientBrush(Point[] points)
public PathGradientBrush(Point[] points)
使用指定的点初始化 PathGradientBrush 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | Point[] | Aspose.Imaging.Point 结构数组,表示构成路径顶点的点。 |
PathGradientBrush(Point[] points, int wrapMode)
public PathGradientBrush(Point[] points, int wrapMode)
使用指定的点和包装模式初始化 PathGradientBrush 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | Point[] | Aspose.Imaging.Point 结构数组,表示构成路径顶点的点。 |
| wrapMode | int | Aspose.Imaging.WrapMode,指定使用此 PathGradientBrush 绘制的填充如何平铺。 |
PathGradientBrush(GraphicsPath path)
public PathGradientBrush(GraphicsPath path)
使用指定的路径初始化 PathGradientBrush 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| path | GraphicsPath | 定义此 PathGradientBrush 填充区域的 GraphicsPath。 |
getInterpolationColors()
public ColorBlend getInterpolationColors()
获取定义多色线性渐变的 com.aspose.imaging.ColorBlend。
Returns:
ColorBlend - A com.aspose.imaging.ColorBlend that defines a multicolor linear gradient.
setInterpolationColors(ColorBlend value)
public void setInterpolationColors(ColorBlend value)
设置定义多色线性渐变的 com.aspose.imaging.ColorBlend。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | ColorBlend | 一个定义多色线性渐变的 com.aspose.imaging.ColorBlend。 |
getCenterColor()
public Color getCenterColor()
获取路径渐变中心的颜色。
Returns:
Color - A com.aspose.imaging.Color that represents the color at the center of the path gradient.
setCenterColor(Color value)
public void setCenterColor(Color value)
设置路径渐变中心的颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | Color | com.aspose.imaging.Color,表示路径渐变中心的颜色。 |
getSurroundColors()
public Color[] getSurroundColors()
获取与此 PathGradientBrush 填充的路径中的点对应的颜色数组。
Returns:
com.aspose.imaging.Color[] - com.aspose.imaging.Color 结构数组,表示与此 PathGradientBrush 填充的路径中每个点关联的颜色。
setSurroundColors(Color[] value)
public void setSurroundColors(Color[] value)
设置与此 PathGradientBrush 填充的路径中的点对应的颜色数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | Color[] | com.aspose.imaging.Color 结构数组,表示与此 PathGradientBrush 填充的路径中每个点关联的颜色。 |
getBlend()
public Blend getBlend()
获取一个 Aspose.Imaging.Blend,它指定用于定义渐变自定义衰减的位置信息和因子。
Returns:
Blend - A Aspose.Imaging.Blend that represents a custom falloff for the gradient.
setBlend(Blend value)
public void setBlend(Blend value)
设置一个 Aspose.Imaging.Blend,它指定用于定义渐变自定义衰减的位置信息和因子。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | Blend | 一个表示渐变自定义衰减的 Aspose.Imaging.Blend。 |
setSigmaBellShape(float focus)
public void setSigmaBellShape(float focus)
创建一种渐变画刷,从路径中心向路径边界逐渐改变颜色。颜色之间的过渡基于钟形曲线。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 焦点 | float | 取值范围为 0 到 1,指定沿从路径中心到路径边界的任意径向,中心颜色达到最高强度的位置。值为 1(默认)时,最高强度位于路径中心。 |
setSigmaBellShape(float focus, float scale)
public void setSigmaBellShape(float focus, float scale)
创建一种渐变画刷,从路径中心向路径边界逐渐改变颜色。颜色之间的过渡基于钟形曲线。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 焦点 | float | 取值范围为 0 到 1,指定沿从路径中心到路径边界的任意径向,中心颜色达到最高强度的位置。值为 1(默认)时,最高强度位于路径中心。 |
| 比例 | float | 取值范围为 0 到 1,指定中心颜色与边界颜色混合的最大强度。值为 1 时会产生中心颜色的最高可能强度,这是默认值。 |
setBlendTriangularShape(float focus)
public void setBlendTriangularShape(float focus)
创建一种渐变,以中心颜色和线性衰减到单个环绕颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 焦点 | float | 取值范围为 0 到 1,指定沿从路径中心到路径边界的任意径向,中心颜色达到最高强度的位置。值为 1(默认)时,最高强度位于路径中心。 |
setBlendTriangularShape(float focus, float scale)
public void setBlendTriangularShape(float focus, float scale)
创建一种渐变,以中心颜色和线性衰减到每个环绕颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 焦点 | float | 取值范围为 0 到 1,指定沿从路径中心到路径边界的任意径向,中心颜色达到最高强度的位置。值为 1(默认)时,最高强度位于路径中心。 |
| 比例 | float | 取值范围为 0 到 1,指定中心颜色与边界颜色混合的最大强度。值为 1 时会产生中心颜色的最高可能强度,这是默认值。 |