PDF Stream Object Base Class
PDF Stream Object Base Class
attrib
TODO
transform
TODO
parent_attrib
TODO
parent_transform
TODO Initialize a stream object
alphas
all alpha channels
gs_name
current GS name TODO: insert PDF spec reference
gs_spec
current gs_spec
clipping_spec
current clipping spec Use clip_polygon if specified. Use clip_rect if specified else NULL
paint_spec
path painting style based upon which of fill/stroke are NULL One of 'n', 's', 'f', 'b'
new()
PDFStream$new(...)
...
stream attributes
Update the attributes of an object.e.g. update the x coordinate:
obj$update(x = 12)
update()
PDFStream$update( ..., fontsize, text_mode, fill, stroke, linewidth, linetype, clip_rect )
...
named attributes
fontsize, text_mode, fill, stroke, linewidth, linetype, clip_rect
common drawing attributes
copy()
Clone the object Convert to full PDF object representation include stream/endstream and length dict.
PDFStream$copy()
as_object()
PDFStream$as_object(obj_idx)
obj_idx
the index to use for this object in the PDF document
print()
Cat just the inner stream part of the object when print()ed
PDFStream$print(...)
...
arguments passed to PDFStream$as_character(...)
Transformations: rotate
rotate()
PDFStream$rotate(degrees, x = 0, y = 0)
degrees
angle of rotation
x, y
rotate around this point. default (0,1) Transformations: translate
translate()
PDFStream$translate(x, y)
x, y
translation distance Transformations: scale
scale()
PDFStream$scale(x, y = x)
x, y
scale factors in x and y directions. If only x
scale
is given, then this value will also be used for the y
scale factor
Convenience method for changing core attribute: fontsize
fontsize()
PDFStream$fontsize(fontsize = 12)
fontsize
fontsize default: 12 Convenience method for changing core attribute: text_mode
text_mode()
PDFStream$text_mode(text_mode = 0)
text_mode
text mode. default 0. TODO: insert reference to PDF spec Convenience method for changing core attribute: fill colour
fill()
PDFStream$fill(fill = "#000000")
fill
fill colour. default '#000000' Convenience method for changing core attribute: stroke colour
stroke()
PDFStream$stroke(stroke = "#000000")
stroke
stroke colour. default: '#000000' Convenience method for changing core attribute: linewidth
linewidth()
PDFStream$linewidth(linewidth = 1)
linewidth
linewidth. default: 1 Convenience method for changing core attribute: fontsize
linetype()
PDFStream$linetype(linetype = 0)
linetype
linetype. default: 0. TODO: Insert reference to PDF spec Convenience method for changing core attribute: clipping rect
clip_rect()
PDFStream$clip_rect(x, y, width, height)
x, y, width, height
dimensions of current clipping rect Convenience method for changing core attribute: clip polygon
clip_polygon()
PDFStream$clip_polygon(xs, ys)
xs, ys
coords of clipping polygon convert stream object to character string
as_character()
PDFStream$as_character(...)
...
ignored
get_transform_spec()
Full transform of all parent objects and this object's transform
PDFStream$get_transform_spec()
get_attrib()
Normalised full set of attributes including parent attributes if available
PDFStream$get_attrib()
clone()
The objects of this class are cloneable with this method.
PDFStream$clone(deep = FALSE)
deep
Whether to make a deep clone.