pub enum ContentOp {
Show 67 variants
SaveState,
RestoreState,
ConcatMatrix(Matrix2D),
SetLineWidth(f64),
SetLineCap(i32),
SetLineJoin(i32),
SetMiterLimit(f64),
SetDashPattern(Vec<f64>, f64),
SetRenderingIntent(Vec<u8>),
SetFlatness(f64),
SetExtGState(Vec<u8>),
MoveTo(f64, f64),
LineTo(f64, f64),
CurveTo(f64, f64, f64, f64, f64, f64),
CurveToInitial(f64, f64, f64, f64),
CurveToFinal(f64, f64, f64, f64),
ClosePath,
Rectangle(f64, f64, f64, f64),
Stroke,
CloseAndStroke,
Fill,
FillEvenOdd,
FillAndStroke,
FillAndStrokeEvenOdd,
CloseFillAndStroke,
CloseFillAndStrokeEvenOdd,
EndPath,
Clip,
ClipEvenOdd,
BeginText,
EndText,
SetCharSpacing(f64),
SetWordSpacing(f64),
SetHorizScaling(f64),
SetTextLeading(f64),
SetFont(Vec<u8>, f64),
SetTextRenderMode(i32),
SetTextRise(f64),
MoveTextPos(f64, f64),
MoveTextPosSetLeading(f64, f64),
SetTextMatrix(Matrix2D),
NextLine,
ShowText(Vec<u8>),
ShowTextAdjusted(Vec<TextOp>),
NextLineShowText(Vec<u8>),
SetSpacingNextLineShowText(f64, f64, Vec<u8>),
SetStrokeColorSpace(Vec<u8>),
SetFillColorSpace(Vec<u8>),
SetStrokeColor(Vec<f64>),
SetFillColor(Vec<f64>),
SetStrokeGray(f64),
SetFillGray(f64),
SetStrokeRGB(f64, f64, f64),
SetFillRGB(f64, f64, f64),
SetStrokeCMYK(f64, f64, f64, f64),
SetFillCMYK(f64, f64, f64, f64),
PaintXObject(Vec<u8>),
PaintShading(Vec<u8>),
InlineImage {
dict: Vec<(Vec<u8>, PdfObject)>,
data: Vec<u8>,
},
MarkedContentPoint(Vec<u8>),
MarkedContentPointProperties(Vec<u8>, PdfObject),
BeginMarkedContent(Vec<u8>),
BeginMarkedContentProperties(Vec<u8>, PdfObject),
EndMarkedContent,
BeginCompat,
EndCompat,
Unknown(Vec<u8>, Vec<PdfObject>),
}Expand description
A parsed content stream operator with its operands.
Variants§
SaveState
q — Save graphics state
RestoreState
Q — Restore graphics state
ConcatMatrix(Matrix2D)
cm — Concatenate matrix to CTM
SetLineWidth(f64)
w — Set line width
SetLineCap(i32)
J — Set line cap style (0=butt, 1=round, 2=square)
SetLineJoin(i32)
j — Set line join style (0=miter, 1=round, 2=bevel)
SetMiterLimit(f64)
M — Set miter limit
SetDashPattern(Vec<f64>, f64)
d — Set dash pattern [array, phase]
SetRenderingIntent(Vec<u8>)
ri — Set rendering intent
SetFlatness(f64)
i — Set flatness tolerance
SetExtGState(Vec<u8>)
gs — Set parameters from graphics state parameter dict
MoveTo(f64, f64)
m — Move to (x, y)
LineTo(f64, f64)
l — Line to (x, y)
CurveTo(f64, f64, f64, f64, f64, f64)
c — Cubic Bézier curve (x1, y1, x2, y2, x3, y3)
CurveToInitial(f64, f64, f64, f64)
v — Cubic Bézier with first control point = current point
CurveToFinal(f64, f64, f64, f64)
y — Cubic Bézier with last control point = final point
ClosePath
h — Close subpath
Rectangle(f64, f64, f64, f64)
re — Rectangle (x, y, w, h)
Stroke
S — Stroke path
CloseAndStroke
s — Close and stroke path
Fill
f or F — Fill path (non-zero winding)
FillEvenOdd
f* — Fill path (even-odd rule)
FillAndStroke
B — Fill and stroke (non-zero winding)
FillAndStrokeEvenOdd
B* — Fill and stroke (even-odd rule)
CloseFillAndStroke
b — Close, fill, and stroke (non-zero winding)
CloseFillAndStrokeEvenOdd
b* — Close, fill, and stroke (even-odd rule)
EndPath
n — End path without filling or stroking (used for clipping)
Clip
W — Set clipping path (non-zero winding)
ClipEvenOdd
W* — Set clipping path (even-odd rule)
BeginText
BT — Begin text object
EndText
ET — End text object
SetCharSpacing(f64)
Tc — Set character spacing
SetWordSpacing(f64)
Tw — Set word spacing
SetHorizScaling(f64)
Tz — Set horizontal scaling (percent)
SetTextLeading(f64)
TL — Set text leading
SetFont(Vec<u8>, f64)
Tf — Set font and size (font_name, size)
SetTextRenderMode(i32)
Tr — Set text rendering mode
SetTextRise(f64)
Ts — Set text rise
MoveTextPos(f64, f64)
Td — Move text position (tx, ty)
MoveTextPosSetLeading(f64, f64)
TD — Move text position and set leading (tx, ty)
SetTextMatrix(Matrix2D)
Tm — Set text matrix
NextLine
T* — Move to start of next line
ShowText(Vec<u8>)
Tj — Show text string
ShowTextAdjusted(Vec<TextOp>)
TJ — Show text with positioning adjustments [(string, adjustment), …]
NextLineShowText(Vec<u8>)
' — Move to next line and show text
SetSpacingNextLineShowText(f64, f64, Vec<u8>)
" — Set word/char spacing, move to next line, show text
SetStrokeColorSpace(Vec<u8>)
CS — Set stroke color space
SetFillColorSpace(Vec<u8>)
cs — Set fill color space
SetStrokeColor(Vec<f64>)
SC or SCN — Set stroke color
SetFillColor(Vec<f64>)
sc or scn — Set fill color
SetStrokeGray(f64)
G — Set stroke gray
SetFillGray(f64)
g — Set fill gray
SetStrokeRGB(f64, f64, f64)
RG — Set stroke RGB
SetFillRGB(f64, f64, f64)
rg — Set fill RGB
SetStrokeCMYK(f64, f64, f64, f64)
K — Set stroke CMYK
SetFillCMYK(f64, f64, f64, f64)
k — Set fill CMYK
PaintXObject(Vec<u8>)
Do — Paint XObject (name)
PaintShading(Vec<u8>)
sh — Paint shading pattern
InlineImage
BI…ID…EI — Inline image
MarkedContentPoint(Vec<u8>)
MP — Marked content point (tag)
MarkedContentPointProperties(Vec<u8>, PdfObject)
DP — Marked content point with properties (tag, properties)
BeginMarkedContent(Vec<u8>)
BMC — Begin marked content (tag)
BeginMarkedContentProperties(Vec<u8>, PdfObject)
BDC — Begin marked content with properties (tag, properties)
EndMarkedContent
EMC — End marked content
BeginCompat
BX — Begin compatibility section
EndCompat
EX — End compatibility section
Unknown(Vec<u8>, Vec<PdfObject>)
Unknown operator