pub enum Operator {
Show 72 variants
BeginText,
EndText,
SetFont {
name: Name,
size: f32,
},
MoveText {
tx: f32,
ty: f32,
},
MoveTextSetLeading {
tx: f32,
ty: f32,
},
SetTextMatrix {
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32,
},
NextLine,
ShowText {
bytes: Vec<u8>,
},
ShowTextArray {
elements: Vec<TextArrayElement>,
},
NextLineShowText {
bytes: Vec<u8>,
},
SetSpacingShowText {
word_space: f32,
char_space: f32,
bytes: Vec<u8>,
},
SetCharSpacing {
spacing: f32,
},
SetWordSpacing {
spacing: f32,
},
SetHorizontalScaling {
scale: f32,
},
SetTextLeading {
leading: f32,
},
SetTextRise {
rise: f32,
},
SetTextRenderingMode {
mode: i64,
},
SaveState,
RestoreState,
ConcatMatrix {
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32,
},
SetLineWidth {
width: f32,
},
SetLineCap {
cap: i64,
},
SetLineJoin {
join: i64,
},
SetMiterLimit {
limit: f32,
},
SetDashPattern {
array: Vec<f32>,
phase: f32,
},
SetRenderingIntent {
intent: Name,
},
SetFlatness {
flatness: f32,
},
SetGraphicsState {
name: Name,
},
MoveTo {
x: f32,
y: f32,
},
LineTo {
x: f32,
y: f32,
},
CurveTo {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
},
CurveToInitial {
x2: f32,
y2: f32,
x3: f32,
y3: f32,
},
CurveToFinal {
x1: f32,
y1: f32,
x3: f32,
y3: f32,
},
ClosePath,
Rectangle {
x: f32,
y: f32,
w: f32,
h: f32,
},
Stroke,
CloseAndStroke,
Fill,
FillObsolete,
FillEvenOdd,
FillStroke,
FillStrokeEvenOdd,
CloseFillStroke,
CloseFillStrokeEvenOdd,
EndPath,
Clip,
ClipEvenOdd,
SetColorSpaceStroke {
name: Name,
},
SetColorSpaceFill {
name: Name,
},
SetColorStroke {
components: Vec<f32>,
},
SetColorFill {
components: Vec<f32>,
},
SetColorStrokeN {
components: Vec<f32>,
name: Option<Name>,
},
SetColorFillN {
components: Vec<f32>,
name: Option<Name>,
},
SetGrayStroke {
gray: f32,
},
SetGrayFill {
gray: f32,
},
SetRgbStroke {
r: f32,
g: f32,
b: f32,
},
SetRgbFill {
r: f32,
g: f32,
b: f32,
},
SetCmykStroke {
c: f32,
m: f32,
y: f32,
k: f32,
},
SetCmykFill {
c: f32,
m: f32,
y: f32,
k: f32,
},
PaintXObject {
name: Name,
},
PaintShading {
name: Name,
},
InlineImage {
properties: HashMap<Name, Operand>,
data: Vec<u8>,
},
BeginMarkedContent {
tag: Name,
},
BeginMarkedContentDict {
tag: Name,
properties: Operand,
},
EndMarkedContent,
MarkedContentPoint {
tag: Name,
},
MarkedContentPointDict {
tag: Name,
properties: Operand,
},
SetCharWidth {
wx: f32,
wy: f32,
},
SetCacheDevice {
wx: f32,
wy: f32,
llx: f32,
lly: f32,
urx: f32,
ury: f32,
},
BeginCompat,
EndCompat,
Unknown {
keyword: Vec<u8>,
operands: Vec<Operand>,
},
}Expand description
A parsed content stream operator with its operands.
Variants§
BeginText
BT — Begin text object.
EndText
ET — End text object.
SetFont
Tf name size — Set font and size.
MoveText
Td tx ty — Move text position.
MoveTextSetLeading
TD tx ty — Move text position and set leading.
SetTextMatrix
Tm a b c d e f — Set text matrix.
NextLine
T* — Move to next line.
ShowText
Tj string — Show text.
ShowTextArray
TJ array — Show text with positioning.
Fields
elements: Vec<TextArrayElement>NextLineShowText
’ string — Move to next line and show text.
SetSpacingShowText
“ aw ac string — Set word/char spacing, move to next line, show text.
SetCharSpacing
Tc charSpace — Set character spacing.
SetWordSpacing
Tw wordSpace — Set word spacing.
SetHorizontalScaling
Tz scale — Set horizontal scaling.
SetTextLeading
TL leading — Set text leading.
SetTextRise
Ts rise — Set text rise.
SetTextRenderingMode
Tr render — Set text rendering mode.
SaveState
q — Save graphics state.
RestoreState
Q — Restore graphics state.
ConcatMatrix
cm a b c d e f — Concatenate matrix.
SetLineWidth
w lineWidth — Set line width.
SetLineCap
J lineCap — Set line cap style.
SetLineJoin
j lineJoin — Set line join style.
SetMiterLimit
M miterLimit — Set miter limit.
SetDashPattern
d dashArray dashPhase — Set line dash pattern.
SetRenderingIntent
ri intent — Set rendering intent.
SetFlatness
i flatness — Set flatness tolerance.
SetGraphicsState
gs name — Set graphics state from external dictionary.
MoveTo
m x y — Begin new subpath.
LineTo
l x y — Append straight line.
CurveTo
c x1 y1 x2 y2 x3 y3 — Append cubic Bezier curve.
CurveToInitial
v x2 y2 x3 y3 — Append cubic Bezier (initial point replicated).
CurveToFinal
y x1 y1 x3 y3 — Append cubic Bezier (final point replicated).
ClosePath
h — Close subpath.
Rectangle
re x y w h — Append rectangle.
Stroke
S — Stroke path.
CloseAndStroke
s — Close and stroke path.
Fill
f — Fill path (non-zero winding rule).
FillObsolete
F — Fill path (non-zero winding rule, obsolete).
FillEvenOdd
f* — Fill path (even-odd rule).
FillStroke
B — Fill and stroke (non-zero winding).
FillStrokeEvenOdd
B* — Fill and stroke (even-odd).
CloseFillStroke
b — Close, fill, and stroke (non-zero winding).
CloseFillStrokeEvenOdd
b* — Close, fill, and stroke (even-odd).
EndPath
n — End path (no-op painting).
Clip
W — Set clipping path (non-zero winding).
ClipEvenOdd
W* — Set clipping path (even-odd).
SetColorSpaceStroke
CS name — Set color space (stroking).
SetColorSpaceFill
cs name — Set color space (non-stroking).
SetColorStroke
SC c1…cn — Set color (stroking).
SetColorFill
sc c1…cn — Set color (non-stroking).
SetColorStrokeN
SCN c1…cn [name] — Set color (stroking, with pattern).
SetColorFillN
scn c1…cn [name] — Set color (non-stroking, with pattern).
SetGrayStroke
G gray — Set gray (stroking).
SetGrayFill
g gray — Set gray (non-stroking).
SetRgbStroke
RG r g b — Set RGB (stroking).
SetRgbFill
rg r g b — Set RGB (non-stroking).
SetCmykStroke
K c m y k — Set CMYK (stroking).
SetCmykFill
k c m y k — Set CMYK (non-stroking).
PaintXObject
Do name — Paint XObject.
PaintShading
sh name — Paint shading.
InlineImage
BI … ID … EI — Inline image with parsed properties and raw data.
BeginMarkedContent
BMC tag — Begin marked content.
BeginMarkedContentDict
BDC tag properties — Begin marked content with properties.
EndMarkedContent
EMC — End marked content.
MarkedContentPoint
MP tag — Marked content point.
MarkedContentPointDict
DP tag properties — Marked content point with properties.
SetCharWidth
d0 wx wy — Set character width (Type 3).
SetCacheDevice
d1 wx wy llx lly urx ury — Set cache device (Type 3).
BeginCompat
BX — Begin compatibility section.
EndCompat
EX — End compatibility section.
Unknown
An unknown/unrecognized operator keyword with its raw operands.