ilog.views.java2d
Class IlvMultipleGradientPaint

java.lang.Object
  extended by ilog.views.java2d.IlvMultipleGradientPaint
All Implemented Interfaces:
IlvPersistentObject, Paint, Transparency
Direct Known Subclasses:
IlvLinearGradientPaint, IlvRadialGradientPaint

public abstract class IlvMultipleGradientPaint
extends Object
implements Paint, IlvPersistentObject

This is the superclass for Paint implementations that use a multiple-color gradient to fill in their raster.

Since:
JViews 5.0
See Also:
Paint, IlvLinearGradientPaint, IlvRadialGradientPaint

Field Summary
static short LINEAR_RGB
          Indicates that the color interpolation should occur in linearized RGB space.
static short SPREAD_PAD
          Indicates that if the gradient starts or ends inside the target region, the remainder region should be filled with the terminal color of the gradient.
static short SPREAD_REFLECT
          Indicates that if the gradient starts or ends inside the target region, the gradient should be reflected continuously until the remainder region is filled.
static short SPREAD_REPEAT
          Indicates that if the gradient starts or ends inside the target region, the gradient should be repeated continuously until the remainder region is filled.
static short SRGB
          Indicates that the color interpolation should occur in sRGB space.
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
IlvMultipleGradientPaint(IlvInputStream stream)
          Builds an IlvMultipleGradientPaint from an IlvInputStream.
 
Method Summary
 Color[] getColors()
          Returns a copy of the array of colors used by this gradient.
 short getColorSpace()
          Returns the interpolation color space of this gradient.
 short getSpreadMethod()
          Returns the spread method of the gradient.
 float[] getStops()
          Returns a copy of the array of floats used by this gradient to calculate color distribution.
 AffineTransform getTransform()
          Returns a copy of the additional transform to apply to the gradient.
 int getTransparency()
          Returns the transparency mode for this gradient.
 boolean isAdapting()
          Returns true if the gradient is adapting itself on the shape it is drawn.
 void write(IlvOutputStream stream)
          Writes the IlvLinearGradientPaint to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.Paint
createContext
 

Field Detail

SPREAD_PAD

public static final short SPREAD_PAD
Indicates that if the gradient starts or ends inside the target region, the remainder region should be filled with the terminal color of the gradient.

See Also:
Constant Field Values

SPREAD_REFLECT

public static final short SPREAD_REFLECT
Indicates that if the gradient starts or ends inside the target region, the gradient should be reflected continuously until the remainder region is filled.

See Also:
Constant Field Values

SPREAD_REPEAT

public static final short SPREAD_REPEAT
Indicates that if the gradient starts or ends inside the target region, the gradient should be repeated continuously until the remainder region is filled.

See Also:
Constant Field Values

SRGB

public static final short SRGB
Indicates that the color interpolation should occur in sRGB space. (default)

See Also:
Constant Field Values

LINEAR_RGB

public static final short LINEAR_RGB
Indicates that the color interpolation should occur in linearized RGB space.

See Also:
Constant Field Values
Constructor Detail

IlvMultipleGradientPaint

public IlvMultipleGradientPaint(IlvInputStream stream)
                         throws IOException,
                                IlvReadFileException
Builds an IlvMultipleGradientPaint from an IlvInputStream.

Throws:
IOException
IlvReadFileException
Method Detail

getColors

public final Color[] getColors()
Returns a copy of the array of colors used by this gradient.

Returns:
A copy of the array of colors used by this gradient.

getStops

public final float[] getStops()
Returns a copy of the array of floats used by this gradient to calculate color distribution.

Returns:
A copy of the array of floats used by this gradient to calculate color distribution.

getTransparency

public final int getTransparency()
Returns the transparency mode for this gradient.

Specified by:
getTransparency in interface Transparency

isAdapting

public final boolean isAdapting()
Returns true if the gradient is adapting itself on the shape it is drawn.


getSpreadMethod

public final short getSpreadMethod()
Returns the spread method of the gradient.

See Also:
SPREAD_PAD, SPREAD_REFLECT, SPREAD_REPEAT

getColorSpace

public final short getColorSpace()
Returns the interpolation color space of this gradient.

See Also:
SRGB, LINEAR_RGB

getTransform

public final AffineTransform getTransform()
Returns a copy of the additional transform to apply to the gradient. The return value is null if no transform is added.


write

public void write(IlvOutputStream stream)
           throws IOException
Writes the IlvLinearGradientPaint to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.