Ops
[Raku PDF Project] / [PDF-Content Module] / PDF::Content :: Ops
class PDF::Content::Ops
A graphics machine for building and interpeting PDF Content operator streams
Description
The PDF::Content::Ops role implements methods and mnemonics for the full operator table, as defined in specification [PDF 1.7 Appendix A]:
head
Methods
method font-face
method font-face() returns PDF::COS::Dictreturns the current graphics font dictionary resource
method font-size
method font-size() returns Numericreturns the current graphics font size
method tags
method tags() returns PDF::Content::Tag::NodeSetreturns the current tags status
multi method gsaves
multi method gsaves(
:$delta! where { ... }
) returns Arrayreturn graphics gsave stack, including changed variables only
multi method gsaves
multi method gsaves() returns Arrayreturn graphics gsave stack, including all graphics variables
multi method graphics-state
multi method graphics-state(
:$delta!
) returns Hashreturn locally updated graphics state variables
multi method graphics-state
multi method graphics-state() returns Mureturn all current graphics state variables
method current-point
method current-point() returns Listreturn current point
This method returns the x,y position of current point in a path context, or an undefined list otherwise.
multi method op
multi method op(
Pair $_ where { ... }
) returns Muprocess operator quarantined by PDF::Grammar::Content / PDF::Native::COS as either an unknown operator or having an incorrect argument list
multi method op
multi method op(
*@args is copy
) returns MuProcess a parsed graphics operation
multi method ops
multi method ops(
Str $ops
) returns ArrayParse and process graphics operations
multi method ops
multi method ops(
@ops
) returns ArrayParse and process a list of graphics operations
method add-comment
method add-comment(
Str $_
) returns MuAdd a comment to the content stream
multi sub parse-content
multi sub parse-content(
Str $content where { ... }
) returns Muparse, but don't process PDF content operators
method finish
method finish() returns MuFinish a content stream
has Str $!content-cache
serialize content into a string. indent blocks for readability
method content-dump
method content-dump() returns Seqserialized current content as a sequence of strings - for debugging/testing
method FALLBACK
method FALLBACK(
$method,
|c
) returns MuTreat operator mnemonics as methods