Skip to main content

ContentOp

Enum ContentOp 

Source
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

BIIDEI — Inline image

Fields

§dict: Vec<(Vec<u8>, PdfObject)>
§data: Vec<u8>
§

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

Trait Implementations§

Source§

impl Clone for ContentOp

Source§

fn clone(&self) -> ContentOp

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContentOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.