org.apache.pdfbox.pdmodel.graphics.shading

## Class RadialShadingContext

- java.lang.Object
- - org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
  - - org.apache.pdfbox.pdmodel.graphics.shading.RadialShadingContext

All Implemented Interfaces:
  PaintContext

    public class RadialShadingContext
    extends ShadingContext

AWT PaintContext for radial shading. Performance improvement done as part of GSoC2014, Tilman Hausherr is the mentor.

Author:
  Shaola Ren

### Constructor Summary

Constructors
Constructor and Description
`RadialShadingContext(PDShadingType3 shading, ColorModel colorModel, AffineTransform xform, Matrix matrix, Rectangle deviceBounds)` Constructor creates an instance to be used for fill operations.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `dispose()`
`float[]` `getCoords()` Returns the coords values.
`float[]` `getDomain()` Returns the domain values.
`boolean[]` `getExtend()` Returns the extend values.
`PDFunction` `getFunction()` Returns the function.
`Raster` `getRaster(int x, int y, int w, int h)`

### Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext

`getColorModel`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RadialShadingContext

    public RadialShadingContext(PDShadingType3 shading,
                                ColorModel colorModel,
                                AffineTransform xform,
                                Matrix matrix,
                                Rectangle deviceBounds)
                         throws IOException

Constructor creates an instance to be used for fill operations.

Parameters:
  `shading` - the shading type to be used
  `colorModel` - the color model to be used
  `xform` - transformation for user to device space
  `matrix` - the pattern matrix concatenated with that of the parent content stream
  `deviceBounds` - the bounds of the area to paint, in device units
Throws:
  `IOException` - if there is an error getting the color space or doing color conversion.

### Method Detail

#### dispose

    public void dispose()

Specified by:
  `dispose` in interface `PaintContext`
Overrides:
  `dispose` in class `ShadingContext`

#### getRaster

    public Raster getRaster(int x,
                            int y,
                            int w,
                            int h)

#### getCoords

    public float[] getCoords()

Returns the coords values.

Returns:
  the coords values

#### getDomain

    public float[] getDomain()

Returns the domain values.

Returns:
  the domain values

#### getExtend

    public boolean[] getExtend()

Returns the extend values.

Returns:
  the extend values

#### getFunction

    public PDFunction getFunction()
                           throws IOException

Returns the function.

Returns:
  the function
Throws:
  `IOException` - if we were not able to create the function.