com.aspose.imaging.brushes
Class PathGradientBrushBase

java.lang.Object
  extended by com.aspose.imaging.DisposableObject
      extended by com.aspose.imaging.Brush
          extended by com.aspose.imaging.brushes.TransformBrush
              extended by com.aspose.imaging.brushes.PathGradientBrushBase
Direct Known Subclasses:
PathGradientBrush, PathMulticolorGradientBrush

public abstract class PathGradientBrushBase
extends TransformBrush

Represents a Brush with base path gradient functionality.


Note that when creating the PathGradientBrushBase class it should be initialized with 2 points at least. The internal path created will always be a closed figure, the last point connects the first point. That shape is filled with this PathGradientBrushBase. The GDI+ implementation throws an OutOfMemoryException when passing in empty arrays or points set having the same coordinates. The PathGradientBrushBase throws an exception when points array contain less than 2 points, the ArgumentException is thrown rather than OutOfMemoryException when points array is unacceptable. The center point is calculated as a center of mass for the passed in points by default. A user can change this point later. The focus scales is an empty point (0.0, 0.0) by default.


Constructor Summary
protected PathGradientBrushBase(GraphicsPath path)
           Initializes a new instance of the PathGradientBrushBase class with the specified path.
protected PathGradientBrushBase(Point[] points)
           Initializes a new instance of the PathGradientBrushBase class with the specified points.
protected PathGradientBrushBase(Point[] points, int wrapMode)
           Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.
protected PathGradientBrushBase(PointF[] points)
           Initializes a new instance of the PathGradientBrushBase class with the specified points.
protected PathGradientBrushBase(PointF[] points, int wrapMode)
           Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.
 
Method Summary
 PointF getCenterPoint()
           Gets the center point of the path gradient.
 PointF getFocusScales()
           Gets the focus point for the gradient falloff.
 GraphicsPath getGraphicsPath()
           Gets the graphics path this brush was build upon.
 PointF[] getPathPoints()
           Gets the path points this brush was build upon.
 void setCenterPoint(PointF value)
           Sets the center point of the path gradient.
 void setFocusScales(PointF value)
           Sets the focus point for the gradient falloff.
 
Methods inherited from class com.aspose.imaging.brushes.TransformBrush
getTransform, getWrapMode, isTransformChanged, multiplyTransform, multiplyTransform, resetTransform, rotateTransform, rotateTransform, scaleTransform, scaleTransform, setTransform, setWrapMode, translateTransform, translateTransform
 
Methods inherited from class com.aspose.imaging.Brush
deepClone, getOpacity, setOpacity
 
Methods inherited from class com.aspose.imaging.DisposableObject
dispose, getDisposed, releaseManagedResources, releaseUnmanagedResources, verifyNotDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathGradientBrushBase

protected PathGradientBrushBase(GraphicsPath path)

Initializes a new instance of the PathGradientBrushBase class with the specified path.

Parameters:
path - The GraphicsPath that defines the area filled by this PathGradientBrushBase.

PathGradientBrushBase

protected PathGradientBrushBase(Point[] points)

Initializes a new instance of the PathGradientBrushBase class with the specified points.

Parameters:
points - An array of Point structures that represents the points that make up the vertices of the path.

PathGradientBrushBase

protected PathGradientBrushBase(Point[] points,
                                int wrapMode)

Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.

Parameters:
points - An array of Point structures that represents the points that make up the vertices of the path.
wrapMode - A WrapMode that specifies how fills drawn with this PathGradientBrushBase are tiled.

PathGradientBrushBase

protected PathGradientBrushBase(PointF[] points)

Initializes a new instance of the PathGradientBrushBase class with the specified points.

Parameters:
points - An array of PointF structures that represents the points that make up the vertices of the path.

PathGradientBrushBase

protected PathGradientBrushBase(PointF[] points,
                                int wrapMode)

Initializes a new instance of the PathGradientBrushBase class with the specified points and wrap mode.

Parameters:
points - An array of PointF structures that represents the points that make up the vertices of the path.
wrapMode - A WrapMode that specifies how fills drawn with this PathGradientBrushBase are tiled.
Method Detail

getCenterPoint

public PointF getCenterPoint()

Gets the center point of the path gradient.

Value: A PointF that represents the center point of the path gradient.


getFocusScales

public PointF getFocusScales()

Gets the focus point for the gradient falloff.

Value: A PointF that represents the focus point for the gradient falloff.


getGraphicsPath

public GraphicsPath getGraphicsPath()

Gets the graphics path this brush was build upon.

Value: The graphics path.


getPathPoints

public PointF[] getPathPoints()

Gets the path points this brush was build upon.

Value: The path points.


setCenterPoint

public void setCenterPoint(PointF value)

Sets the center point of the path gradient.

Value: A PointF that represents the center point of the path gradient.


setFocusScales

public void setFocusScales(PointF value)

Sets the focus point for the gradient falloff.

Value: A PointF that represents the focus point for the gradient falloff.