Package org.jpedal.constants
Class XObject
java.lang.Object
org.jpedal.constants.XObject
Represents a basic Form XObject.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWrite stream drawing commands to this XObjectwithParameters(DrawParameters drawParameters) Add extended graphics state parameters using aDrawParametersobject.
-
Constructor Details
-
XObject
public XObject(float[] boundingBox) Create a new Form XObject.- Parameters:
boundingBox- An array of four numbers in the form coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject’s bounding box.
-
XObject
public XObject(float[] boundingBox, float[] matrix) Create a new Form XObject.- Parameters:
boundingBox- An array of four numbers in the form coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject’s bounding box.matrix- An array of six numbers specifying the form matrix, which maps form space into user space.
-
-
Method Details
-
draw
Write stream drawing commands to this XObject- Parameters:
commands- the commands to write- Returns:
- a reference to this XObject
-
withParameters
Add extended graphics state parameters using aDrawParametersobject.This will insert the
gscommand at the point where you call it, therefore you should use it near the beginning of the constructed stream, just after theqcommand.You may call this method more than once with different or the same draw parameters. Identical draw parameters are cached so that the minimal amount of dictionaries are created.
- Parameters:
drawParameters- the drawing parameters for this XObject- Returns:
- a reference to this XObject
-