|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.pdf.content.CSDeviceAdapter
de.intarsys.pdf.content.CSBasicDevice
public abstract class CSBasicDevice
A ICSDevice handling the complex semantics of the path and text
drawing operators.
As this are expensive operations, devices that do not rely on path and text handling may override the respective methods to save performance.
| Field Summary | |
|---|---|
static float |
THOUSAND
|
| Fields inherited from class de.intarsys.pdf.content.CSDeviceAdapter |
|---|
MAX_STACK_SIZE |
| Constructor Summary | |
|---|---|
CSBasicDevice()
|
|
| Method Summary | |
|---|---|
void |
open(ICSInterpreter interpreter)
Open the device for use by interpreter. |
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. |
void |
textShow(byte[] text,
int offset,
int length)
Show a sequence of bytes as text. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float THOUSAND
| Constructor Detail |
|---|
public CSBasicDevice()
| Method Detail |
|---|
public void open(ICSInterpreter interpreter)
ICSDeviceinterpreter.
open in interface ICSDeviceopen in class CSDeviceAdapterpublic void pathClipEvenOdd()
ICSDevicePDF graphics operator "W*"
pathClipEvenOdd in interface ICSDevicepathClipEvenOdd in class CSDeviceAdapterpublic void pathClipNonZero()
ICSDevicePDF graphics operator "W"
pathClipNonZero in interface ICSDevicepathClipNonZero in class CSDeviceAdapterpublic void pathClose()
ICSDevicePDF graphics operator "h"
pathClose in interface ICSDevicepathClose in class CSDeviceAdapterpublic void pathCloseFillStrokeEvenOdd()
ICSDevicePDF graphics operator "b*"
pathCloseFillStrokeEvenOdd in interface ICSDevicepathCloseFillStrokeEvenOdd in class CSDeviceAdapterpublic void pathCloseFillStrokeNonZero()
ICSDevicePDF graphics operator "b"
pathCloseFillStrokeNonZero in interface ICSDevicepathCloseFillStrokeNonZero in class CSDeviceAdapterpublic void pathCloseStroke()
ICSDevicePDF graphics operator "s"
pathCloseStroke in interface ICSDevicepathCloseStroke in class CSDeviceAdapterpublic void pathEnd()
ICSDeviceThis may for example be used to manipulate the clipping path without a painting operation.
PDF graphics operator "n"
pathEnd in interface ICSDevicepathEnd in class CSDeviceAdapterpublic void pathFillEvenOdd()
ICSDevicePDF graphics operator "f*"
pathFillEvenOdd in interface ICSDevicepathFillEvenOdd in class CSDeviceAdapterpublic void pathFillNonZero()
ICSDeviceAn open subpath is closed before filling.
PDF graphics operator "f"
pathFillNonZero in interface ICSDevicepathFillNonZero in class CSDeviceAdapterpublic void pathFillStrokeEvenOdd()
ICSDevicePDF graphics operator "B*"
pathFillStrokeEvenOdd in interface ICSDevicepathFillStrokeEvenOdd in class CSDeviceAdapterpublic void pathFillStrokeNonZero()
ICSDevicePDF graphics operator "B"
pathFillStrokeNonZero in interface ICSDevicepathFillStrokeNonZero in class CSDeviceAdapterpublic void pathStroke()
ICSDevicePDF graphics operator "S"
pathStroke in interface ICSDevicepathStroke in class CSDeviceAdapter
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
ICSDevice
current
+---------* x1/y1
. _
-.
. *x2/y2
.
.
.
+ x3/y3
PDF graphics operator "c"
penCurveToC in interface ICSDevicepenCurveToC in class CSDeviceAdapterx1 - x coordinate of first control pointy1 - y coordinate of first control pointx2 - x coordinate of second control pointy2 - y coordinate of second control pointx3 - x coordinate of endpointy3 - y coordinate of endpoint
public void penCurveToV(float x2,
float y2,
float x3,
float y3)
ICSDevice
current
+
. _
-.
. *x2/y2
.
.
.
+ x3/y3
PDF graphics operator "v"
penCurveToV in interface ICSDevicepenCurveToV in class CSDeviceAdapterx2 - x coordinate of second control pointy2 - y coordinate of second control pointx3 - x coordinate of endpointy3 - y coordinate of endpoint
public void penCurveToY(float x1,
float y1,
float x3,
float y3)
ICSDevice
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"
penCurveToY in interface ICSDevicepenCurveToY in class CSDeviceAdapterx1 - x coordinate of first control pointy1 - y coordinate of first control pointx3 - x coordinate of endpointy3 - y coordinate of endpoint
public void penLineTo(float x,
float y)
ICSDevicex, y.
The new current point is x, y.
PDF graphics operator "l"
penLineTo in interface ICSDevicepenLineTo in class CSDeviceAdapterx - The new current x coordinatey - The new current y coordinate
public void penMoveTo(float x,
float y)
ICSDevicex, y. No line
is added to the path, a new subpath is started.
PDF graphics operator "m"
penMoveTo in interface ICSDevicepenMoveTo in class CSDeviceAdapterx - The new current x coordinatey - The new current y coordinate
public void penRectangle(float x,
float y,
float w,
float h)
ICSDevice
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"
penRectangle in interface ICSDevicepenRectangle in class CSDeviceAdapterx - The x coordinate of the lower left corner in user spacey - The y coordinate of the lower left corner in user spacew - The width in user spaceh - The height in user space
public void textShow(byte[] text,
int offset,
int length)
ICSDevicePDF graphics operator "Tj"
textShow in interface ICSDevicetextShow in class CSDeviceAdaptertext - The bytes to be shown.
|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||