pub struct ExtGState {Show 27 fields
pub line_width: Option<f64>,
pub line_cap: Option<LineCap>,
pub line_join: Option<LineJoin>,
pub miter_limit: Option<f64>,
pub dash_pattern: Option<LineDashPattern>,
pub rendering_intent: Option<RenderingIntent>,
pub overprint_stroke: Option<bool>,
pub overprint_fill: Option<bool>,
pub overprint_mode: Option<u8>,
pub font: Option<ExtGStateFont>,
pub black_generation: Option<TransferFunction>,
pub black_generation_2: Option<TransferFunction>,
pub undercolor_removal: Option<TransferFunction>,
pub undercolor_removal_2: Option<TransferFunction>,
pub transfer_function: Option<TransferFunction>,
pub transfer_function_2: Option<TransferFunction>,
pub halftone: Option<Halftone>,
pub flatness: Option<f64>,
pub smoothness: Option<f64>,
pub stroke_adjustment: Option<bool>,
pub blend_mode: Option<BlendMode>,
pub soft_mask: Option<SoftMask>,
pub alpha_stroke: Option<f64>,
pub alpha_fill: Option<f64>,
pub alpha_is_shape: Option<bool>,
pub text_knockout: Option<bool>,
pub use_black_point_compensation: Option<bool>,
}Expand description
Extended Graphics State Dictionary according to ISO 32000-1 Section 8.4
Fields§
§line_width: Option<f64>Line width (LW)
line_cap: Option<LineCap>Line cap style (LC)
line_join: Option<LineJoin>Line join style (LJ)
miter_limit: Option<f64>Miter limit (ML)
dash_pattern: Option<LineDashPattern>Line dash pattern (D)
rendering_intent: Option<RenderingIntent>Rendering intent (RI)
overprint_stroke: Option<bool>Overprint for stroking operations (OP)
overprint_fill: Option<bool>Overprint for non-stroking operations (op)
overprint_mode: Option<u8>Overprint mode (OPM)
font: Option<ExtGStateFont>Font and size (Font)
black_generation: Option<TransferFunction>Black generation function (BG)
black_generation_2: Option<TransferFunction>Black generation function alternative (BG2)
undercolor_removal: Option<TransferFunction>Undercolor removal function (UCR)
undercolor_removal_2: Option<TransferFunction>Undercolor removal function alternative (UCR2)
transfer_function: Option<TransferFunction>Transfer function (TR)
transfer_function_2: Option<TransferFunction>Transfer function alternative (TR2)
halftone: Option<Halftone>Halftone dictionary (HT)
flatness: Option<f64>Flatness tolerance (FL)
smoothness: Option<f64>Smoothness tolerance (SM)
stroke_adjustment: Option<bool>Automatic stroke adjustment (SA)
blend_mode: Option<BlendMode>Blend mode (BM)
soft_mask: Option<SoftMask>Soft mask (SMask)
alpha_stroke: Option<f64>Alpha constant for stroking (CA)
alpha_fill: Option<f64>Alpha constant for non-stroking (ca)
alpha_is_shape: Option<bool>Alpha source flag (AIS)
text_knockout: Option<bool>Text knockout flag (TK)
use_black_point_compensation: Option<bool>Black point compensation (UseBlackPtComp)
Implementations§
Source§impl ExtGState
impl ExtGState
Sourcepub fn with_line_width(self, width: f64) -> Self
pub fn with_line_width(self, width: f64) -> Self
Set line width
Sourcepub fn with_line_cap(self, cap: LineCap) -> Self
pub fn with_line_cap(self, cap: LineCap) -> Self
Set line cap style
Sourcepub fn with_line_join(self, join: LineJoin) -> Self
pub fn with_line_join(self, join: LineJoin) -> Self
Set line join style
Sourcepub fn with_miter_limit(self, limit: f64) -> Self
pub fn with_miter_limit(self, limit: f64) -> Self
Set miter limit
Sourcepub fn with_dash_pattern(self, pattern: LineDashPattern) -> Self
pub fn with_dash_pattern(self, pattern: LineDashPattern) -> Self
Set line dash pattern
Sourcepub fn with_rendering_intent(self, intent: RenderingIntent) -> Self
pub fn with_rendering_intent(self, intent: RenderingIntent) -> Self
Set rendering intent
Sourcepub fn with_overprint_stroke(self, overprint: bool) -> Self
pub fn with_overprint_stroke(self, overprint: bool) -> Self
Set overprint for stroking operations
Sourcepub fn with_overprint_fill(self, overprint: bool) -> Self
pub fn with_overprint_fill(self, overprint: bool) -> Self
Set overprint for non-stroking operations
Sourcepub fn with_overprint_mode(self, mode: u8) -> Self
pub fn with_overprint_mode(self, mode: u8) -> Self
Set overprint mode
Sourcepub fn with_flatness(self, flatness: f64) -> Self
pub fn with_flatness(self, flatness: f64) -> Self
Set flatness tolerance
Sourcepub fn with_smoothness(self, smoothness: f64) -> Self
pub fn with_smoothness(self, smoothness: f64) -> Self
Set smoothness tolerance
Sourcepub fn with_stroke_adjustment(self, adjustment: bool) -> Self
pub fn with_stroke_adjustment(self, adjustment: bool) -> Self
Set automatic stroke adjustment
Sourcepub fn with_blend_mode(self, mode: BlendMode) -> Self
pub fn with_blend_mode(self, mode: BlendMode) -> Self
Set blend mode
Sourcepub fn with_alpha_stroke(self, alpha: f64) -> Self
pub fn with_alpha_stroke(self, alpha: f64) -> Self
Set alpha constant for stroking operations
Sourcepub fn with_alpha_fill(self, alpha: f64) -> Self
pub fn with_alpha_fill(self, alpha: f64) -> Self
Set alpha constant for non-stroking operations
Sourcepub fn with_alpha(self, alpha: f64) -> Self
pub fn with_alpha(self, alpha: f64) -> Self
Set alpha constant for both stroking and non-stroking operations
Sourcepub fn with_alpha_is_shape(self, is_shape: bool) -> Self
pub fn with_alpha_is_shape(self, is_shape: bool) -> Self
Set alpha source flag
Sourcepub fn with_text_knockout(self, knockout: bool) -> Self
pub fn with_text_knockout(self, knockout: bool) -> Self
Set text knockout flag
Sourcepub fn set_soft_mask(&mut self, mask: SoftMask)
pub fn set_soft_mask(&mut self, mask: SoftMask)
Set soft mask for transparency
Sourcepub fn set_soft_mask_name(&mut self, name: String)
pub fn set_soft_mask_name(&mut self, name: String)
Set soft mask with a named XObject
Sourcepub fn set_soft_mask_none(&mut self)
pub fn set_soft_mask_none(&mut self)
Remove soft mask (set to None)
Sourcepub fn with_black_point_compensation(self, use_compensation: bool) -> Self
pub fn with_black_point_compensation(self, use_compensation: bool) -> Self
Set black point compensation (PDF 2.0)
Sourcepub fn with_transfer_function(self, func: TransferFunction) -> Self
pub fn with_transfer_function(self, func: TransferFunction) -> Self
Set transfer function for output device gamma correction
Sourcepub fn with_gamma_correction(self, gamma: f64) -> Self
pub fn with_gamma_correction(self, gamma: f64) -> Self
Set gamma correction transfer function
Sourcepub fn with_linear_transfer(self, slope: f64, intercept: f64) -> Self
pub fn with_linear_transfer(self, slope: f64, intercept: f64) -> Self
Set linear transfer function with slope and intercept
Sourcepub fn with_transfer_function_2(self, func: TransferFunction) -> Self
pub fn with_transfer_function_2(self, func: TransferFunction) -> Self
Set alternative transfer function (TR2)
Sourcepub fn with_black_generation(self, func: TransferFunction) -> Self
pub fn with_black_generation(self, func: TransferFunction) -> Self
Set black generation function
Sourcepub fn with_undercolor_removal(self, func: TransferFunction) -> Self
pub fn with_undercolor_removal(self, func: TransferFunction) -> Self
Set undercolor removal function
Sourcepub fn uses_transparency(&self) -> bool
pub fn uses_transparency(&self) -> bool
Check if any transparency parameters are set
Sourcepub fn to_pdf_dictionary(&self) -> Result<String>
pub fn to_pdf_dictionary(&self) -> Result<String>
Generate PDF dictionary representation
Sourcepub fn to_dict(&self) -> Dictionary
pub fn to_dict(&self) -> Dictionary
Convert to Dictionary object for PDF writer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExtGState
impl RefUnwindSafe for ExtGState
impl Send for ExtGState
impl Sync for ExtGState
impl Unpin for ExtGState
impl UnwindSafe for ExtGState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().