GraphicState Class Documentation

classGraphicState

Namespace:com::datalogics::PDFL

Detailed Description

The graphic state is an internal data structure in a PDF file. The graphics state holds the parameters that describe graphics within that file.

These parameters define how individual graphics are presented on the page, including layers and transparencies.

Constructor & Destructor Documentation

GraphicState

GraphicState()

Create a new default GraphicState.

Member Function Documentation

DisposeChildren

voidDisposeChildren()

Returns:

void

[static initializer]

static void[static initializer]()

delete

synchronized voiddelete(Booleandisposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized voiddelete()

Returns:

synchronized void

finalize

voidfinalize()

Returns:

void

getDashPattern

java.util.List< Double >getDashPattern()

Returns:

A list containing the dash phase followed by the contents of the DashPattern.

The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state.

getExtendedGraphicState

ExtendedGraphicStategetExtendedGraphicState()

Returns:

The ExtendedGraphicState, or null if none is set.

The ExtendedGraphicState associated with this GraphicState.

The ExtendedGraphicState can contain additional parameters such as transparency, blend mode, and overprint settings that are not part of the basic GraphicState.

getFillColor

ColorgetFillColor()

Returns:

The current fill color.

The color used for filling operations in the current GraphicState.

getLineCap

LineCapgetLineCap()

Returns:

The current line cap style.

The line cap style used by the current GraphicState, specifying the shape at the ends of open subpaths when stroked.

getLineFlatness

doublegetLineFlatness()

Returns:

The current line flatness value.

The line flatness tolerance in the current GraphicState, corresponding to the i operator. Default is 1.0.

Flatness controls the maximum distance (in device pixels) between a curve and the flattened line segments that approximate it.

getLineJoin

LineJoingetLineJoin()

Returns:

The current line join style.

The line join style used by the current GraphicState, specifying the shape at the corners where consecutive segments of a path connect at an angle.

getMiterLimit

doublegetMiterLimit()

Returns:

The current miter limit.

The miter limit for line joins in the current GraphicState, corresponding to the M operator. Default is 10.0.

When two line segments meet at a sharp angle and mitered joins have been specified, the miter limit controls when the join is beveled instead.

getRenderIntent

RenderIntentgetRenderIntent()

Returns:

The current rendering intent.

The color rendering intent for the current GraphicState, corresponding to the Intent key in the image dictionary. The default is RelColorimetric.

getStrokeColor

ColorgetStrokeColor()

Returns:

The current stroke color.

The color used for stroking operations in the current GraphicState.

getWidth

doublegetWidth()

Returns:

The current line width.

The line width used for stroking operations by the current GraphicState, in user space units.

setDashPattern

voidsetDashPattern(java.util.List< Double >DashPattern)

Parameters

DashPattern: java.util.List< Double >

A list containing the dash phase followed by the contents of the DashPattern.

Returns:

void

The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state.

setExtendedGraphicState

voidsetExtendedGraphicState(ExtendedGraphicStateextendedGraphicState)

Parameters

extendedGraphicState: ExtendedGraphicState

The new ExtendedGraphicState, or null to remove it.

Returns:

void

The ExtendedGraphicState associated with this GraphicState.

The ExtendedGraphicState can contain additional parameters such as transparency, blend mode, and overprint settings that are not part of the basic GraphicState.

setFillColor

voidsetFillColor(Colorfillcolor)

Parameters

fillcolor: Color

The new fill color.

Returns:

void

The color used for filling operations in the current GraphicState.

The color may be specified in DeviceGray, DeviceRGB, or DeviceCMYK color spaces.

setLineCap

voidsetLineCap(LineCapLineCap)

Parameters

LineCap: LineCap

Returns:

void

The line cap style used by the current GraphicState, specifying the shape at the ends of open subpaths when stroked.

setLineFlatness

voidsetLineFlatness(doubleflatness)

Parameters

flatness: double

The new flatness value.

Returns:

void

The line flatness tolerance in the current GraphicState, corresponding to the i operator. Default is 1.0.

setLineJoin

voidsetLineJoin(LineJoinLineJoin)

Parameters

LineJoin: LineJoin

Returns:

void

The line join style to be used by the current GraphicState, specifying the shape at the corners where consecutive segments of a path connect at an angle.

setMiterLimit

voidsetMiterLimit(doublemiterLimit)

Parameters

miterLimit: double

The new miter limit value.

Returns:

void

The miter limit for line joins in the current GraphicState, corresponding to the M operator. Default is 10.0.

setRenderIntent

voidsetRenderIntent(RenderIntentrenderingIntent)

Parameters

renderingIntent: RenderIntent

The new rendering intent.

Returns:

void

The color rendering intent for the current GraphicState, corresponding to the Intent key in the image dictionary. The default is RelColorimetric.

setStrokeColor

voidsetStrokeColor(Colorstrokecolor)

Parameters

strokecolor: Color

The new stroke color.

Returns:

void

The color used for stroking operations in the current GraphicState.

The color may be specified in DeviceGray, DeviceRGB, or DeviceCMYK color spaces.

setWidth

voidsetWidth(doublewidth)

Parameters

width: double

The new line width.

Returns:

void

The line width used for stroking operations by the current GraphicState, in user space units.