Skip to main content

StrokeParams

Struct StrokeParams 

Source
pub struct StrokeParams {
Show 22 fields pub color: DeviceColor, pub line_width: f64, pub line_cap: LineCap, pub line_join: LineJoin, pub miter_limit: f64, pub dash_pattern: DashPattern, pub ctm: Matrix, pub stroke_adjust: bool, pub is_text_glyph: bool, pub overprint: bool, pub overprint_mode: i32, pub opm_paired: bool, pub painted_channels: u8, pub is_device_cmyk: bool, pub spot_color: Option<SpotColor>, pub rendering_intent: u8, pub transfer: TransferState, pub halftone: HalftoneState, pub bg_ucr: BgUcrState, pub alpha: f64, pub blend_mode: u8, pub alpha_is_shape: bool,
}
Expand description

Parameters for stroking a path.

New fields may be added without notice; pattern-matching consumers should use .. to ignore unmatched fields.

Fields§

§color: DeviceColor§line_width: f64§line_cap: LineCap§line_join: LineJoin§miter_limit: f64§dash_pattern: DashPattern§ctm: Matrix§stroke_adjust: bool

When true, snap thin stroke coordinates to device pixel centers.

§is_text_glyph: bool

True when this stroke is a text glyph from a show operator (PaintType 2).

§overprint: bool

Overprint flag from graphics state (used by PDF output).

§overprint_mode: i32

Overprint mode (0 or 1).

§opm_paired: bool

See FillParams::opm_paired. Strict OPM-1 preserve requires both /OPM and /op|/OP set in the same ExtGState dict.

§painted_channels: u8

Which CMYK channels this stroke paints (bitmask of CMYK_C/M/Y/K).

§is_device_cmyk: bool

True when stroke color space is DeviceCMYK or ICCBased(4) — OPM 1 only applies to these.

§spot_color: Option<SpotColor>

Separation/DeviceN color for PDF output. None for device color spaces.

§rendering_intent: u8

Rendering intent (0=RelativeColorimetric, 1=Absolute, 2=Perceptual, 3=Saturation).

§transfer: TransferState

Pre-sampled transfer function state for PDF output.

§halftone: HalftoneState

Pre-computed halftone screen state for PDF output.

§bg_ucr: BgUcrState

Pre-sampled black generation / undercolor removal for PDF output.

§alpha: f64

Stroke opacity (0.0–1.0, default 1.0). Used by PDF transparency.

§blend_mode: u8

Blend mode (0=Normal, 1=Multiply, …, 11=Exclusion). Default 0.

§alpha_is_shape: bool

PDF AIS (alpha-is-shape). When true, the source is interpreted as shape rather than opacity. Default false.

Trait Implementations§

Source§

impl Clone for StrokeParams

Source§

fn clone(&self) -> StrokeParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for StrokeParams

Source§

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

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

impl Default for StrokeParams

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