jPod PDF library

de.intarsys.pdf.content
Class CSTextFilter

java.lang.Object
  extended by de.intarsys.pdf.content.CSDeviceFilter
      extended by de.intarsys.pdf.content.CSTextFilter
All Implemented Interfaces:
ICSDevice, ICSDeviceFeatures

public class CSTextFilter
extends CSDeviceFilter

Only text related operations will reach the device.

This implementation will ignore clipping paths!


Constructor Summary
CSTextFilter(ICSDevice device)
           
 
Method Summary
 void doShading(COSName resourceName, PDShading shading)
          Paint shape and color shading according to shading dictionary.
 void inlineImage(PDImage img)
          Stroke an inlined image.
 void markedContentBegin(COSName tag)
          Begin a marked content sequence.
 void markedContentBeginProperties(COSName tag, COSName resourceName, COSDictionary properties)
          Begin a marked content sequence with a property list.
 void markedContentEnd()
          End marked content sequence started with "BMC" or "BDC".
 void markedContentPoint(COSName tag)
          Set a marked point.
 void markedContentPointProperties(COSName tag, COSName resourceName, COSDictionary properties)
          Define a marked content point with a property list.
 void pathClipEvenOdd()
          Intersect the current clipping path with the current path using the even/odd rule.
 void pathClipNonZero()
          Intersect the current clipping path with the current path using the nonzero winding rule.
 void pathClose()
          Close the path and append a line segment from the current coordinate to the starting point of the path.
 void pathCloseFillStrokeEvenOdd()
          Close, Fill and then stroke the path using the even/odd rule.
 void pathCloseFillStrokeNonZero()
          Close, Fill and then stroke the path using the non zero winding rule.
 void pathCloseStroke()
          Close and then stroke the path.
 void pathEnd()
          End the path without filling or stroking.
 void pathFillEvenOdd()
          Fill the path using the even/odd rule.
 void pathFillNonZero()
          Fill the path using the non-zero winding rule.
 void pathFillStrokeEvenOdd()
          Fill and then stroke the path using the even/odd rule.
 void pathFillStrokeNonZero()
          Fill and then stroke the path using the non-zero winding rule.
 void pathStroke()
          Stroke the current path.
 void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
          Append a cubic bezier curve to the path.
 void penCurveToV(float x2, float y2, float x3, float y3)
          Append a cubic bezier curve to the path.
 void penCurveToY(float x1, float y1, float x3, float y3)
          Append a cubic bezier curve to the path.
 void penLineTo(float x, float y)
          Add a line from the current point to x, y.
 void penMoveTo(float x, float y)
          Move the current point to x, y.
 void penRectangle(float x, float y, float w, float h)
          Append a complete rectangle to as a subpath.
 
Methods inherited from class de.intarsys.pdf.content.CSDeviceFilter
close, compatibilityBegin, compatibilityEnd, doXObject, getDevice, getGraphicsState, getInterpreter, open, restoreState, saveState, setExtendedState, setFlatnessTolerance, setLineCap, setLineDash, setLineJoin, setLineWidth, setMiterLimit, setNonStrokeColorCMYK, setNonStrokeColorGray, setNonStrokeColorRGB, setNonStrokeColorSpace, setNonStrokeColorValues, setNonStrokeColorValues, setRenderingIntent, setStrokeColorCMYK, setStrokeColorGray, setStrokeColorRGB, setStrokeColorSpace, setStrokeColorValues, setStrokeColorValues, supportsColorSpace, supportsExtendedState, supportsFont, supportsInlineImage, supportsPattern, supportsProperties, supportsShading, supportsXObject, textBegin, textEnd, textLineMove, textLineNew, textMove, textMoveTo, textSetCharSpacing, textSetFont, textSetHorizontalScaling, textSetLeading, textSetRenderingMode, textSetRise, textSetTransform, textSetWordSpacing, textShow, textShow, textShow, textT3SetGlyphWidth, textT3SetGlyphWidthBB, transform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSTextFilter

public CSTextFilter(ICSDevice device)
Method Detail

doShading

public void doShading(COSName resourceName,
                      PDShading shading)
Description copied from interface: ICSDevice
Paint shape and color shading according to shading dictionary.

PDF graphics operator "sh"

Specified by:
doShading in interface ICSDevice
Overrides:
doShading in class CSDeviceFilter
Parameters:
resourceName - The logical name of the resource in the PDResources
shading - The PDShading to be painted.

inlineImage

public void inlineImage(PDImage img)
Description copied from interface: ICSDevice
Stroke an inlined image.

PDF graphics operators "BI", "ID", "EI"

Specified by:
inlineImage in interface ICSDevice
Overrides:
inlineImage in class CSDeviceFilter
Parameters:
img - The inlined image. The image may use some special keys instead of the standard PDImage dictionary keys.

markedContentBegin

public void markedContentBegin(COSName tag)
Description copied from interface: ICSDevice
Begin a marked content sequence.

PDF graphics operator "BMC"

Specified by:
markedContentBegin in interface ICSDevice
Overrides:
markedContentBegin in class CSDeviceFilter
Parameters:
tag - The tag indicating the role or significance.

markedContentBeginProperties

public void markedContentBeginProperties(COSName tag,
                                         COSName resourceName,
                                         COSDictionary properties)
Description copied from interface: ICSDevice
Begin a marked content sequence with a property list.

PDF graphics operator "BDC"

Specified by:
markedContentBeginProperties in interface ICSDevice
Overrides:
markedContentBeginProperties in class CSDeviceFilter
Parameters:
tag - The tag indicating the role or significance.
resourceName - The logical name of the resource in the PDResources
properties - The properties for the marked content sequence.

markedContentEnd

public void markedContentEnd()
Description copied from interface: ICSDevice
End marked content sequence started with "BMC" or "BDC".

PDF graphics operator "EMC"

Specified by:
markedContentEnd in interface ICSDevice
Overrides:
markedContentEnd in class CSDeviceFilter

markedContentPoint

public void markedContentPoint(COSName tag)
Description copied from interface: ICSDevice
Set a marked point.

PDF graphics operator "MP"

Specified by:
markedContentPoint in interface ICSDevice
Overrides:
markedContentPoint in class CSDeviceFilter
Parameters:
tag - The tag indicating the role or significance.

markedContentPointProperties

public void markedContentPointProperties(COSName tag,
                                         COSName resourceName,
                                         COSDictionary properties)
Description copied from interface: ICSDevice
Define a marked content point with a property list.

PDF graphics operator "DP"

Specified by:
markedContentPointProperties in interface ICSDevice
Overrides:
markedContentPointProperties in class CSDeviceFilter
Parameters:
tag - The tag indicating the role or significance.
resourceName - The logical name of the resource in the PDResources
properties - The properties for the marked content point.

pathClipEvenOdd

public void pathClipEvenOdd()
Description copied from interface: ICSDevice
Intersect the current clipping path with the current path using the even/odd rule.

PDF graphics operator "W*"

Specified by:
pathClipEvenOdd in interface ICSDevice
Overrides:
pathClipEvenOdd in class CSDeviceFilter

pathClipNonZero

public void pathClipNonZero()
Description copied from interface: ICSDevice
Intersect the current clipping path with the current path using the nonzero winding rule.

PDF graphics operator "W"

Specified by:
pathClipNonZero in interface ICSDevice
Overrides:
pathClipNonZero in class CSDeviceFilter

pathClose

public void pathClose()
Description copied from interface: ICSDevice
Close the path and append a line segment from the current coordinate to the starting point of the path.

PDF graphics operator "h"

Specified by:
pathClose in interface ICSDevice
Overrides:
pathClose in class CSDeviceFilter

pathCloseFillStrokeEvenOdd

public void pathCloseFillStrokeEvenOdd()
Description copied from interface: ICSDevice
Close, Fill and then stroke the path using the even/odd rule.

PDF graphics operator "b*"

Specified by:
pathCloseFillStrokeEvenOdd in interface ICSDevice
Overrides:
pathCloseFillStrokeEvenOdd in class CSDeviceFilter

pathCloseFillStrokeNonZero

public void pathCloseFillStrokeNonZero()
Description copied from interface: ICSDevice
Close, Fill and then stroke the path using the non zero winding rule.

PDF graphics operator "b"

Specified by:
pathCloseFillStrokeNonZero in interface ICSDevice
Overrides:
pathCloseFillStrokeNonZero in class CSDeviceFilter

pathCloseStroke

public void pathCloseStroke()
Description copied from interface: ICSDevice
Close and then stroke the path.

PDF graphics operator "s"

Specified by:
pathCloseStroke in interface ICSDevice
Overrides:
pathCloseStroke in class CSDeviceFilter

pathEnd

public void pathEnd()
Description copied from interface: ICSDevice
End the path without filling or stroking.

This may for example be used to manipulate the clipping path without a painting operation.

PDF graphics operator "n"

Specified by:
pathEnd in interface ICSDevice
Overrides:
pathEnd in class CSDeviceFilter

pathFillEvenOdd

public void pathFillEvenOdd()
Description copied from interface: ICSDevice
Fill the path using the even/odd rule.

PDF graphics operator "f*"

Specified by:
pathFillEvenOdd in interface ICSDevice
Overrides:
pathFillEvenOdd in class CSDeviceFilter

pathFillNonZero

public void pathFillNonZero()
Description copied from interface: ICSDevice
Fill the path using the non-zero winding rule.

An open subpath is closed before filling.

PDF graphics operator "f"

Specified by:
pathFillNonZero in interface ICSDevice
Overrides:
pathFillNonZero in class CSDeviceFilter

pathFillStrokeEvenOdd

public void pathFillStrokeEvenOdd()
Description copied from interface: ICSDevice
Fill and then stroke the path using the even/odd rule.

PDF graphics operator "B*"

Specified by:
pathFillStrokeEvenOdd in interface ICSDevice
Overrides:
pathFillStrokeEvenOdd in class CSDeviceFilter

pathFillStrokeNonZero

public void pathFillStrokeNonZero()
Description copied from interface: ICSDevice
Fill and then stroke the path using the non-zero winding rule.

PDF graphics operator "B"

Specified by:
pathFillStrokeNonZero in interface ICSDevice
Overrides:
pathFillStrokeNonZero in class CSDeviceFilter

pathStroke

public void pathStroke()
Description copied from interface: ICSDevice
Stroke the current path.

PDF graphics operator "S"

Specified by:
pathStroke in interface ICSDevice
Overrides:
pathStroke in class CSDeviceFilter

penCurveToC

public void penCurveToC(float x1,
                        float y1,
                        float x2,
                        float y2,
                        float x3,
                        float y3)
Description copied from interface: ICSDevice
Append a cubic bezier curve to the path.
The curve extends from the current point to x3, y3, where x1,y1 and x2,y2 are the bezier control points. current +---------* x1/y1 . _ -. . *x2/y2 . . . + x3/y3

PDF graphics operator "c"

Specified by:
penCurveToC in interface ICSDevice
Overrides:
penCurveToC in class CSDeviceFilter
Parameters:
x1 - x coordinate of first control point
y1 - y coordinate of first control point
x2 - x coordinate of second control point
y2 - y coordinate of second control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penCurveToV

public void penCurveToV(float x2,
                        float y2,
                        float x3,
                        float y3)
Description copied from interface: ICSDevice
Append a cubic bezier curve to the path. The curve extends from the current point to x3, y3, where the first control point coincides with the current point and x2,y2 is the second bezier control point. current + . _ -. . *x2/y2 . . . + x3/y3

PDF graphics operator "v"

Specified by:
penCurveToV in interface ICSDevice
Overrides:
penCurveToV in class CSDeviceFilter
Parameters:
x2 - x coordinate of second control point
y2 - y coordinate of second control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penCurveToY

public void penCurveToY(float x1,
                        float y1,
                        float x3,
                        float y3)
Description copied from interface: ICSDevice
Append a cubic bezier curve to the path.

The curve extends from the current point to x3, y3, where x1,y1 and x3,y3 are the bezier control points. current +---------* x1/y1 . _ -. . . . . + x3/y3

PDF graphics operator "y"

Specified by:
penCurveToY in interface ICSDevice
Overrides:
penCurveToY in class CSDeviceFilter
Parameters:
x1 - x coordinate of first control point
y1 - y coordinate of first control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penLineTo

public void penLineTo(float x,
                      float y)
Description copied from interface: ICSDevice
Add a line from the current point to x, y. The new current point is x, y.

PDF graphics operator "l"

Specified by:
penLineTo in interface ICSDevice
Overrides:
penLineTo in class CSDeviceFilter
Parameters:
x - The new current x coordinate
y - The new current y coordinate

penMoveTo

public void penMoveTo(float x,
                      float y)
Description copied from interface: ICSDevice
Move the current point to x, y. No line is added to the path, a new subpath is started.

PDF graphics operator "m"

Specified by:
penMoveTo in interface ICSDevice
Overrides:
penMoveTo in class CSDeviceFilter
Parameters:
x - The new current x coordinate
y - The new current y coordinate

penRectangle

public void penRectangle(float x,
                         float y,
                         float w,
                         float h)
Description copied from interface: ICSDevice
Append a complete rectangle to as a subpath.

The lower left corner is at x, y, the dimensions are width and height. The numbers are defined in user space.

PDF graphics operator "re"

Specified by:
penRectangle in interface ICSDevice
Overrides:
penRectangle in class CSDeviceFilter
Parameters:
x - The x coordinate of the lower left corner in user space
y - The y coordinate of the lower left corner in user space
w - The width in user space
h - The height in user space

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.