Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.graphics.shading

pack-priv Class Type1ShadingContext

extends ShadingContext
Class Inheritance
Imports
java.awt.geom.AffineTransform, .NoninvertibleTransformException, java.awt.image.ColorModel, .Raster, .WritableRaster, java.io.IOException, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace, org.apache.pdfbox.util.Matrix

AWT PaintContext for function-based (Type 1) shading.
Author
Tilman Hausherr

Field Summary

Modifier and TypeField and Description
private final float[]
private static final Log
private AffineTransform
private PDShadingType1

Constructor Summary

AccessConstructor and Description
pack-priv
Type1ShadingContext(PDShadingType1
the shading type to be used
shading
,
ColorModel
the color model to be used
colorModel
,
AffineTransform
transformation for user to device space
xform
,
Matrix
the pattern matrix concatenated with that of the parent content stream
matrix
)

Constructor creates an instance to be used for fill operations.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Overrides org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext.dispose.

Implements java.awt.PaintContext.dispose.

Releases the resources allocated for the operation.

public float[]
public Raster
getRaster(int
the x coordinate of the area in device space for which colors are generated.
x
,
int
the y coordinate of the area in device space for which colors are generated.
y
,
int
the width of the area in device space
w
,
int
the height of the area in device space
h
)

Implements java.awt.PaintContext.getRaster.

Returns a Raster containing the colors generated for the graphics operation.

Inherited from org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext:
convertToRGBgetBackgroundgetColorModelgetRgbBackgroundgetShadinggetShadingColorSpace

Field Detail

domainback to summary
private final float[] domain
LOGback to summary
private static final Log LOG
ratback to summary
private AffineTransform rat
type1ShadingTypeback to summary
private PDShadingType1 type1ShadingType

Constructor Detail

Type1ShadingContextback to summary
pack-priv Type1ShadingContext(PDShadingType1 shading, ColorModel colorModel, AffineTransform xform, Matrix matrix) throws IOException

Constructor creates an instance to be used for fill operations.

Parameters
shading:PDShadingType1

the shading type to be used

colorModel:ColorModel

the color model to be used

xform:AffineTransform

transformation for user to device space

matrix:Matrix

the pattern matrix concatenated with that of the parent content stream

Method Detail

disposeback to summary
public void dispose()

Overrides org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext.dispose.

Implements java.awt.PaintContext.dispose.

Doc from java.awt.PaintContext.dispose.

Releases the resources allocated for the operation.

Annotations
@Override
getDomainback to summary
public float[] getDomain()
getRasterback to summary
public Raster getRaster(int x, int y, int w, int h)

Implements java.awt.PaintContext.getRaster.

Doc from java.awt.PaintContext.getRaster.

Returns a Raster containing the colors generated for the graphics operation.

Parameters
x:int

the x coordinate of the area in device space for which colors are generated.

y:int

the y coordinate of the area in device space for which colors are generated.

w:int

the width of the area in device space

h:int

the height of the area in device space

Returns:Raster

a Raster representing the specified rectangular area and containing the colors generated for the graphics operation.

Annotations
@Override