Skip to main content

Operator

Enum Operator 

Source
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.

Fields

§name: Name
§size: f32
§

MoveText

Td tx ty — Move text position.

Fields

§tx: f32
§ty: f32
§

MoveTextSetLeading

TD tx ty — Move text position and set leading.

Fields

§tx: f32
§ty: f32
§

SetTextMatrix

Tm a b c d e f — Set text matrix.

Fields

§

NextLine

T* — Move to next line.

§

ShowText

Tj string — Show text.

Fields

§bytes: Vec<u8>
§

ShowTextArray

TJ array — Show text with positioning.

Fields

§

NextLineShowText

’ string — Move to next line and show text.

Fields

§bytes: Vec<u8>
§

SetSpacingShowText

“ aw ac string — Set word/char spacing, move to next line, show text.

Fields

§word_space: f32
§char_space: f32
§bytes: Vec<u8>
§

SetCharSpacing

Tc charSpace — Set character spacing.

Fields

§spacing: f32
§

SetWordSpacing

Tw wordSpace — Set word spacing.

Fields

§spacing: f32
§

SetHorizontalScaling

Tz scale — Set horizontal scaling.

Fields

§scale: f32
§

SetTextLeading

TL leading — Set text leading.

Fields

§leading: f32
§

SetTextRise

Ts rise — Set text rise.

Fields

§rise: f32
§

SetTextRenderingMode

Tr render — Set text rendering mode.

Fields

§mode: i64
§

SaveState

q — Save graphics state.

§

RestoreState

Q — Restore graphics state.

§

ConcatMatrix

cm a b c d e f — Concatenate matrix.

Fields

§

SetLineWidth

w lineWidth — Set line width.

Fields

§width: f32
§

SetLineCap

J lineCap — Set line cap style.

Fields

§cap: i64
§

SetLineJoin

j lineJoin — Set line join style.

Fields

§join: i64
§

SetMiterLimit

M miterLimit — Set miter limit.

Fields

§limit: f32
§

SetDashPattern

d dashArray dashPhase — Set line dash pattern.

Fields

§array: Vec<f32>
§phase: f32
§

SetRenderingIntent

ri intent — Set rendering intent.

Fields

§intent: Name
§

SetFlatness

i flatness — Set flatness tolerance.

Fields

§flatness: f32
§

SetGraphicsState

gs name — Set graphics state from external dictionary.

Fields

§name: Name
§

MoveTo

m x y — Begin new subpath.

Fields

§

LineTo

l x y — Append straight line.

Fields

§

CurveTo

c x1 y1 x2 y2 x3 y3 — Append cubic Bezier curve.

Fields

§x1: f32
§y1: f32
§x2: f32
§y2: f32
§x3: f32
§y3: f32
§

CurveToInitial

v x2 y2 x3 y3 — Append cubic Bezier (initial point replicated).

Fields

§x2: f32
§y2: f32
§x3: f32
§y3: f32
§

CurveToFinal

y x1 y1 x3 y3 — Append cubic Bezier (final point replicated).

Fields

§x1: f32
§y1: f32
§x3: f32
§y3: f32
§

ClosePath

h — Close subpath.

§

Rectangle

re x y w h — Append rectangle.

Fields

§

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).

Fields

§name: Name
§

SetColorSpaceFill

cs name — Set color space (non-stroking).

Fields

§name: Name
§

SetColorStroke

SC c1…cn — Set color (stroking).

Fields

§components: Vec<f32>
§

SetColorFill

sc c1…cn — Set color (non-stroking).

Fields

§components: Vec<f32>
§

SetColorStrokeN

SCN c1…cn [name] — Set color (stroking, with pattern).

Fields

§components: Vec<f32>
§name: Option<Name>
§

SetColorFillN

scn c1…cn [name] — Set color (non-stroking, with pattern).

Fields

§components: Vec<f32>
§name: Option<Name>
§

SetGrayStroke

G gray — Set gray (stroking).

Fields

§gray: f32
§

SetGrayFill

g gray — Set gray (non-stroking).

Fields

§gray: f32
§

SetRgbStroke

RG r g b — Set RGB (stroking).

Fields

§

SetRgbFill

rg r g b — Set RGB (non-stroking).

Fields

§

SetCmykStroke

K c m y k — Set CMYK (stroking).

Fields

§

SetCmykFill

k c m y k — Set CMYK (non-stroking).

Fields

§

PaintXObject

Do name — Paint XObject.

Fields

§name: Name
§

PaintShading

sh name — Paint shading.

Fields

§name: Name
§

InlineImage

BI … ID … EI — Inline image with parsed properties and raw data.

Fields

§properties: HashMap<Name, Operand>
§data: Vec<u8>
§

BeginMarkedContent

BMC tag — Begin marked content.

Fields

§tag: Name
§

BeginMarkedContentDict

BDC tag properties — Begin marked content with properties.

Fields

§tag: Name
§properties: Operand
§

EndMarkedContent

EMC — End marked content.

§

MarkedContentPoint

MP tag — Marked content point.

Fields

§tag: Name
§

MarkedContentPointDict

DP tag properties — Marked content point with properties.

Fields

§tag: Name
§properties: Operand
§

SetCharWidth

d0 wx wy — Set character width (Type 3).

Fields

§wx: f32
§wy: f32
§

SetCacheDevice

d1 wx wy llx lly urx ury — Set cache device (Type 3).

Fields

§wx: f32
§wy: f32
§llx: f32
§lly: f32
§urx: f32
§ury: f32
§

BeginCompat

BX — Begin compatibility section.

§

EndCompat

EX — End compatibility section.

§

Unknown

An unknown/unrecognized operator keyword with its raw operands.

Fields

§keyword: Vec<u8>
§operands: Vec<Operand>

Trait Implementations§

Source§

impl Clone for Operator

Source§

fn clone(&self) -> Operator

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 Operator

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Operator

Source§

fn eq(&self, other: &Operator) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Operator

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more