Skip to main content

GraphicsState

Struct GraphicsState 

Source
pub struct GraphicsState {
Show 23 fields pub ctm: Matrix2D, pub line_width: f64, pub line_cap: i32, pub line_join: i32, pub miter_limit: f64, pub dash_array: Vec<f64>, pub dash_phase: f64, pub fill_color: Vec<f64>, pub stroke_color: Vec<f64>, pub fill_color_space: Vec<u8>, pub stroke_color_space: Vec<u8>, pub char_spacing: f64, pub word_spacing: f64, pub horiz_scaling: f64, pub text_leading: f64, pub font_name: Vec<u8>, pub font_size: f64, pub text_render_mode: i32, pub text_rise: f64, pub text_matrix: Matrix2D, pub text_line_matrix: Matrix2D, pub fill_opacity: f64, pub stroke_opacity: f64,
}
Expand description

The complete graphics state at any point during content stream processing.

Fields§

§ctm: Matrix2D

Current transformation matrix.

§line_width: f64

Line width.

§line_cap: i32

Line cap style (0=butt, 1=round, 2=square).

§line_join: i32

Line join style (0=miter, 1=round, 2=bevel).

§miter_limit: f64

Miter limit.

§dash_array: Vec<f64>

Dash pattern.

§dash_phase: f64

Dash phase.

§fill_color: Vec<f64>

Fill color components.

§stroke_color: Vec<f64>

Stroke color components.

§fill_color_space: Vec<u8>

Fill color space name.

§stroke_color_space: Vec<u8>

Stroke color space name.

§char_spacing: f64

Character spacing.

§word_spacing: f64

Word spacing.

§horiz_scaling: f64

Horizontal scaling (percentage, default 100).

§text_leading: f64

Text leading.

§font_name: Vec<u8>

Current font name (resource name, e.g., “F1”).

§font_size: f64

Current font size.

§text_render_mode: i32

Text rendering mode (0-7).

§text_rise: f64

Text rise.

§text_matrix: Matrix2D

Text matrix (set by Tm, modified by Td/TD/T*).

§text_line_matrix: Matrix2D

Text line matrix (set at start of line, used by T* and ’).

§fill_opacity: f64

Fill opacity (0.0 - 1.0).

§stroke_opacity: f64

Stroke opacity (0.0 - 1.0).

Trait Implementations§

Source§

impl Clone for GraphicsState

Source§

fn clone(&self) -> GraphicsState

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 GraphicsState

Source§

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

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

impl Default for GraphicsState

Source§

fn default() -> Self

Returns the “default value” for a type. 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.