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