Packages

 

com.aspose.imaging.brushes

Class LinearMulticolorGradientBrush

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable


    public final class LinearMulticolorGradientBrush
    extends LinearGradientBrushBase

    Represents a Brush with linear gradient defined by multiple colors and appropriate positions. This class cannot be inherited.

    • Constructor Detail

      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush()

        Initializes a new instance of the LinearMulticolorGradientBrush class with default parameters. The starting color is black, the ending color is white, the angle is 45 degrees and the rectangle is located in (0,0) with size (1,1).

      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(Point point1,
                                             Point point2)

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

        Parameters:
        point1 - A Aspose.Imaging.Point structure that represents the starting point of the linear gradient.
        point2 - A Aspose.Imaging.Point structure that represents the endpoint of the linear gradient.
      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(PointF point1,
                                             PointF point2)

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

        Parameters:
        point1 - A Aspose.Imaging.PointF structure that represents the starting point of the linear gradient.
        point2 - A Aspose.Imaging.PointF structure that represents the endpoint of the linear gradient.
      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(Rectangle rect,
                                             float angle)

        Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.

        Parameters:
        rect - A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
        angle - The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(RectangleF rect,
                                             float angle)

        Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.

        Parameters:
        rect - A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
        angle - The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(Rectangle rect,
                                             float angle,
                                             boolean isAngleScalable)

        Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.

        Parameters:
        rect - A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
        angle - The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
        isAngleScalable - if set to true the angle is changed during transformations with this LinearMulticolorGradientBrush.
      • LinearMulticolorGradientBrush

        public LinearMulticolorGradientBrush(RectangleF rect,
                                             float angle,
                                             boolean isAngleScalable)

        Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.

        Parameters:
        rect - A Aspose.Imaging.RectangleF structure that specifies the bounds of the linear gradient.
        angle - The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
        isAngleScalable - if set to true the angle is changed during transformations with this LinearMulticolorGradientBrush.
    • Method Detail

      • getInterpolationColors

        public ColorBlend getInterpolationColors()

        Gets a com.aspose.imaging.ColorBlend that defines a multicolor linear gradient.

        Returns:
        A com.aspose.imaging.ColorBlend that defines a multicolor linear gradient.
      • setInterpolationColors

        public void setInterpolationColors(ColorBlend value)

        Sets a com.aspose.imaging.ColorBlend that defines a multicolor linear gradient.

        Parameters:
        value - A com.aspose.imaging.ColorBlend that defines a multicolor linear gradient.