com.lowagie.text.pdf

Class PdfShading

public class PdfShading extends Object

Implements the shading dictionary (or stream).

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
protected booleanantiAlias
Holds value of property antiAlias.
protected float[]bBox
Holds value of property bBox.
protected ColorDetailscolorDetails
Colorcspace
protected PdfDictionaryshading
protected PdfNameshadingName
protected PdfIndirectReferenceshadingReference
protected intshadingType
protected PdfWriterwriter
Constructor Summary
protected PdfShading(PdfWriter writer)
Creates new PdfShading
Method Summary
voidaddToBody()
static voidcheckCompatibleColors(Color c1, Color c2)
float[]getBBox()
static float[]getColorArray(Color color)
ColorDetailsgetColorDetails()
ColorgetColorSpace()
PdfNamegetShadingName()
PdfIndirectReferencegetShadingReference()
PdfWritergetWriter()
booleanisAntiAlias()
voidsetAntiAlias(boolean antiAlias)
voidsetBBox(float[] bBox)
protected voidsetColorSpace(Color color)
voidsetName(int number)
static PdfShadingsimpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd)
static PdfShadingsimpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor)
static PdfShadingsimpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd)
static PdfShadingsimpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor)
static voidthrowColorSpaceError()
static PdfShadingtype1(PdfWriter writer, Color colorSpace, float[] domain, float[] tMatrix, PdfFunction function)
static PdfShadingtype2(PdfWriter writer, Color colorSpace, float[] coords, float[] domain, PdfFunction function, boolean[] extend)
static PdfShadingtype3(PdfWriter writer, Color colorSpace, float[] coords, float[] domain, PdfFunction function, boolean[] extend)

Field Detail

antiAlias

protected boolean antiAlias
Holds value of property antiAlias.

bBox

protected float[] bBox
Holds value of property bBox.

colorDetails

protected ColorDetails colorDetails

cspace

private Color cspace

shading

protected PdfDictionary shading

shadingName

protected PdfName shadingName

shadingReference

protected PdfIndirectReference shadingReference

shadingType

protected int shadingType

writer

protected PdfWriter writer

Constructor Detail

PdfShading

protected PdfShading(PdfWriter writer)
Creates new PdfShading

Method Detail

addToBody

void addToBody()

checkCompatibleColors

public static void checkCompatibleColors(Color c1, Color c2)

getBBox

public float[] getBBox()

getColorArray

public static float[] getColorArray(Color color)

getColorDetails

ColorDetails getColorDetails()

getColorSpace

public Color getColorSpace()

getShadingName

PdfName getShadingName()

getShadingReference

PdfIndirectReference getShadingReference()

getWriter

PdfWriter getWriter()

isAntiAlias

public boolean isAntiAlias()

setAntiAlias

public void setAntiAlias(boolean antiAlias)

setBBox

public void setBBox(float[] bBox)

setColorSpace

protected void setColorSpace(Color color)

setName

void setName(int number)

simpleAxial

public static PdfShading simpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd)

simpleAxial

public static PdfShading simpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor)

simpleRadial

public static PdfShading simpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd)

simpleRadial

public static PdfShading simpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor)

throwColorSpaceError

public static void throwColorSpaceError()

type1

public static PdfShading type1(PdfWriter writer, Color colorSpace, float[] domain, float[] tMatrix, PdfFunction function)

type2

public static PdfShading type2(PdfWriter writer, Color colorSpace, float[] coords, float[] domain, PdfFunction function, boolean[] extend)

type3

public static PdfShading type3(PdfWriter writer, Color colorSpace, float[] coords, float[] domain, PdfFunction function, boolean[] extend)