pub struct GraphicsState {
pub line_width: f64,
pub stroke_color: Color,
pub fill_color: Color,
pub dash_pattern: DashPattern,
pub stroke_alpha: f64,
pub fill_alpha: f64,
}Expand description
Graphics state relevant to path painting.
Fields§
§line_width: f64Current line width (default: 1.0 per PDF spec).
stroke_color: ColorCurrent stroking color.
fill_color: ColorCurrent non-stroking (fill) color.
dash_pattern: DashPatternCurrent dash pattern (default: solid line).
stroke_alpha: f64Stroking alpha / opacity (CA, default: 1.0 = fully opaque).
fill_alpha: f64Non-stroking alpha / opacity (ca, default: 1.0 = fully opaque).
Implementations§
Source§impl GraphicsState
impl GraphicsState
Sourcepub fn apply_ext_gstate(&mut self, ext: &ExtGState)
pub fn apply_ext_gstate(&mut self, ext: &ExtGState)
Apply an ExtGState dictionary to this graphics state.
Only fields that are Some in the ExtGState are overridden.
Sourcepub fn set_dash_pattern(&mut self, dash_array: Vec<f64>, dash_phase: f64)
pub fn set_dash_pattern(&mut self, dash_array: Vec<f64>, dash_phase: f64)
Set the dash pattern directly (d operator).
Trait Implementations§
Source§impl Clone for GraphicsState
impl Clone for GraphicsState
Source§fn clone(&self) -> GraphicsState
fn clone(&self) -> GraphicsState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphicsState
impl Debug for GraphicsState
Source§impl Default for GraphicsState
impl Default for GraphicsState
Source§impl PartialEq for GraphicsState
impl PartialEq for GraphicsState
impl StructuralPartialEq for GraphicsState
Auto Trait Implementations§
impl Freeze for GraphicsState
impl RefUnwindSafe for GraphicsState
impl Send for GraphicsState
impl Sync for GraphicsState
impl Unpin for GraphicsState
impl UnsafeUnpin for GraphicsState
impl UnwindSafe for GraphicsState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more