public class CustomPaintEvent
extends java.util.EventObject
| Constructor and Description |
|---|
CustomPaintEvent(java.lang.Object source,
RenderContext context)
Initializes a new instance of the
CustomPaintEvent class. |
| Modifier and Type | Method and Description |
|---|---|
GradientBrush |
createLinearGradient(double angle,
float[] positions,
java.awt.Color[] colors)
Creates a linear gradient with orientation defined by an angle and
a blend specified by a series of positions and color objects.
|
RadialGradientBrush |
createRadialGradient(java.awt.geom.Point2D centerPoint,
float[] positions,
java.awt.Color[] colors)
Creates a radial gradient with the specified center point and
a blend specified by a series of positions and color objects.
|
RenderContext |
getContext()
Gets the rendering context.
|
VisualElement |
getElement()
Gets the element being custom drawn.
|
java.awt.Graphics2D |
getGraphics()
Gets the target graphics.
|
void |
paintVisualElement(VisualElement element,
java.awt.geom.Dimension2D constraint)
Paints the specified visual element to the underlying IGraphics.
|
public CustomPaintEvent(java.lang.Object source,
RenderContext context)
CustomPaintEvent class.public GradientBrush createLinearGradient(double angle, float[] positions, java.awt.Color[] colors)
angle - The orientation of the gradient, expressed in degrees.positions - The positions of the gradient stops.colors - The colors of the gradient stops.GradientBrush with the specified characteristics.public RadialGradientBrush createRadialGradient(java.awt.geom.Point2D centerPoint, float[] positions, java.awt.Color[] colors)
centerPoint - The center point of the path gradient.positions - The positions of the gradient stops.colors - The colors of the gradient stops.public void paintVisualElement(VisualElement element, java.awt.geom.Dimension2D constraint)
element - The VisualElement to paint.constraint - The available size.context - The rendering context.public VisualElement getElement()
public RenderContext getContext()
public java.awt.Graphics2D getGraphics()