org.apache.pdfbox.pdmodel.graphics.shading
Class ShadingContext

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
Direct Known Subclasses:
AxialShadingContext, RadialShadingContext

public abstract class ShadingContext
extends Object

A base class to handle stuff that is common to all shading types.

Author:
Shaola Ren, Tilman Hausherr

Field Summary
protected  PDRectangle bboxRect
           
protected  PDColorSpace colorSpace
           
protected  Rectangle deviceBounds
           
protected  float maxBBoxX
           
protected  float maxBBoxY
           
protected  float minBBoxX
           
protected  float minBBoxY
           
protected  ColorModel outputColorModel
           
protected  PDShadingResources shading
           
protected  ColorSpace shadingColorSpace
           
protected  PDFunction shadingTinttransform
           
 
Constructor Summary
ShadingContext(PDShadingResources shading, ColorModel cm, AffineTransform xform, Matrix ctm, int pageHeight, Rectangle dBounds)
           
 
Method Summary
protected  int convertToRGB(float[] values)
           
 PDFunction getShadingTintTransform()
          Returns the function used for the shading tint transformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shading

protected final PDShadingResources shading

deviceBounds

protected final Rectangle deviceBounds

shadingColorSpace

protected ColorSpace shadingColorSpace

colorSpace

protected PDColorSpace colorSpace

bboxRect

protected PDRectangle bboxRect

minBBoxX

protected float minBBoxX

minBBoxY

protected float minBBoxY

maxBBoxX

protected float maxBBoxX

maxBBoxY

protected float maxBBoxY

outputColorModel

protected ColorModel outputColorModel

shadingTinttransform

protected PDFunction shadingTinttransform
Constructor Detail

ShadingContext

public ShadingContext(PDShadingResources shading,
                      ColorModel cm,
                      AffineTransform xform,
                      Matrix ctm,
                      int pageHeight,
                      Rectangle dBounds)
               throws IOException
Throws:
IOException
Method Detail

convertToRGB

protected int convertToRGB(float[] values)

getShadingTintTransform

public PDFunction getShadingTintTransform()
Returns the function used for the shading tint transformation.

Returns:
the shading tint transformation function


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.