Packages

 

com.aspose.imaging.brushes

Class PathGradientBrushBase

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable
    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 OutOfMemoryError 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 OutOfMemoryError 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.

    • Method Detail

      • getPathPoints

        public PointF[] getPathPoints()

        Gets the path points this brush was build upon.

        Returns:
        The path points.
      • getGraphicsPath

        public GraphicsPath getGraphicsPath()

        Gets the graphics path this brush was build upon.

        Returns:
        The graphics path.
      • getCenterPoint

        public PointF getCenterPoint()

        Gets or sets the center point of the path gradient.

        Returns:
        A Aspose.Imaging.PointF that represents the center point of the path gradient.
      • setCenterPoint

        public void setCenterPoint(PointF value)

        Gets or sets the center point of the path gradient.

        Parameters:
        value - A Aspose.Imaging.PointF that represents the center point of the path gradient.
      • getFocusScales

        public PointF getFocusScales()

        Gets the focus point for the gradient falloff.

        Returns:
        A Aspose.Imaging.PointF that represents the focus point for the gradient falloff.
      • setFocusScales

        public void setFocusScales(PointF value)

        Gets or sets the focus point for the gradient falloff.

        Parameters:
        value - A Aspose.Imaging.PointF that represents the focus point for the gradient falloff.