[Raku PDF Project] / [PDF-Content Module] / PDF::Content :: Canvas
A graphical content container such as a page, xobject form, or pattern
this role is applied to PDF::Content::Page and PDF::Content::XObject['Form']
.
method gfx(
|c
) returns PDF::Content
appended graphics return appended PDF content stream
method pre-gfx() returns PDF::Content
return prepended graphics
method next-mcid() returns UInt:D
Allocate the next MCID (Marked Content Identifier)
method contents() returns Str
return contents
method contents-parse() returns Mu
reparse contents
method render(
Bool :$tidy = Bool::True,
|c
) returns PDF::Content
render graphics
method finish() returns Mu
finish for serialization purposes
method xobject-form(
:$group = Bool::True,
*%dict
) returns PDF::Content::XObject
create a child XObject Form
method tiling-pattern(
List :$BBox!,
Numeric :$XStep = Code.new,
Numeric :$YStep = Code.new,
Int :$PaintType = 1,
Int :$TilingType = 1,
Hash :$Resources = Code.new,
*%dict
) returns PDF::Content::XObject
create a new Type 1 (Tiling) Pattern
method save-as-image(
Str $outfile where { ... },
|c
) returns Mu
draft rendering via Cairo (experimental)
The PDF::To::Cairo module must be installed to use this method
snapshot of previous, and currently open tags