com.aspose.imaging.brushes
Class LinearGradientBrushBase

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.LinearGradientBrushBase
Direct Known Subclasses:
LinearGradientBrush, LinearMulticolorGradientBrush

public abstract class LinearGradientBrushBase
extends TransformBrush

Represents a Brush with gradient capabilities and appropriate properties.


Constructor Summary
protected LinearGradientBrushBase()
           Initializes a new instance of the LinearGradientBrushBase class with default parameters.
protected LinearGradientBrushBase(PointF point1, PointF point2)
           Initializes a new instance of the LinearGradientBrushBase class.
protected LinearGradientBrushBase(Point point1, Point point2)
           Initializes a new instance of the LinearGradientBrushBase class.
protected LinearGradientBrushBase(RectangleF rect, float angle, boolean isAngleScalable)
           Initializes a new instance of the LinearGradientBrushBase class based on a rectangle, starting and ending colors, and an orientation angle.
protected LinearGradientBrushBase(Rectangle rect, float angle, boolean isAngleScalable)
           Initializes a new instance of the LinearGradientBrushBase class based on a rectangle and an orientation angle.
 
Method Summary
 float getAngle()
           Gets the gradient angle.
 boolean getGammaCorrection()
           Gets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase.
 RectangleF getRectangle()
           Gets a rectangular region that defines the starting and ending points of the gradient.
 boolean isAngleScalable()
           Gets a value indicating whether LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase.
 void isAngleScalable(boolean value)
           Sets a value indicating whether LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase.
 void setAngle(float value)
           Sets the gradient angle.
 void setGammaCorrection(boolean value)
           Sets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase.
 void setRectangle_Rename_Namesake(RectangleF value)
           Sets a rectangular region that defines the starting and ending points of the gradient.
 
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

LinearGradientBrushBase

protected LinearGradientBrushBase()

Initializes a new instance of the LinearGradientBrushBase class with default parameters. The angle is 45 degrees and the rectangle is located in (0,0) with size (1,1).


LinearGradientBrushBase

protected LinearGradientBrushBase(PointF point1,
                                  PointF point2)

Initializes a new instance of the LinearGradientBrushBase class. The gradient rectangle is claculated from the specified points.

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

LinearGradientBrushBase

protected LinearGradientBrushBase(Point point1,
                                  Point point2)

Initializes a new instance of the LinearGradientBrushBase class. The gradient rectangle is claculated from the specified points.

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

LinearGradientBrushBase

protected LinearGradientBrushBase(RectangleF rect,
                                  float angle,
                                  boolean isAngleScalable)

Initializes a new instance of the LinearGradientBrushBase class based on a rectangle, starting and ending colors, and an orientation angle.

Parameters:
rect - A 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 trasnformations with this LinearGradientBrushBase.

LinearGradientBrushBase

protected LinearGradientBrushBase(Rectangle rect,
                                  float angle,
                                  boolean isAngleScalable)

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

Parameters:
rect - A 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 trasnformations applied to this LinearGradientBrushBase.
Method Detail

getAngle

public float getAngle()

Gets the gradient angle.

Value: The gradient angle.


getGammaCorrection

public boolean getGammaCorrection()

Gets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase.

Value: The value is true if gamma correction is enabled for this LinearGradientBrushBase; otherwise, false.


getRectangle

public RectangleF getRectangle()

Gets a rectangular region that defines the starting and ending points of the gradient.

Value: A RectangleF structure that specifies the starting and ending points of the gradient.


isAngleScalable

public boolean isAngleScalable()

Gets a value indicating whether LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase.

Value: true if LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase; otherwise, false.


isAngleScalable

public void isAngleScalable(boolean value)

Sets a value indicating whether LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase.

Value: true if LinearGradientBrushBase.Angle is changed during trasnformations with this LinearGradientBrushBase; otherwise, false.


setAngle

public void setAngle(float value)

Sets the gradient angle.

Value: The gradient angle.


setGammaCorrection

public void setGammaCorrection(boolean value)

Sets a value indicating whether gamma correction is enabled for this LinearGradientBrushBase.

Value: The value is true if gamma correction is enabled for this LinearGradientBrushBase; otherwise, false.


setRectangle_Rename_Namesake

public void setRectangle_Rename_Namesake(RectangleF value)

Sets a rectangular region that defines the starting and ending points of the gradient.

Value: A RectangleF structure that specifies the starting and ending points of the gradient.