pub struct ExtGraphicsState<'a> { /* private fields */ }
Expand description
Writer for a dictionary with additional parameters for the graphics state.
This struct is created by Chunk::ext_graphics
and
ShadingPattern::ext_graphics
.
Implementations§
source§impl<'a> ExtGraphicsState<'a>
impl<'a> ExtGraphicsState<'a>
sourcepub fn line_width(&mut self, width: f32) -> &mut Self
pub fn line_width(&mut self, width: f32) -> &mut Self
Write the LW
attribute to set the line width. PDF 1.3+.
sourcepub fn line_cap(&mut self, cap: LineCapStyle) -> &mut Self
pub fn line_cap(&mut self, cap: LineCapStyle) -> &mut Self
Write the LC
attribute to set the line cap style. PDF 1.3+.
sourcepub fn line_join(&mut self, join: LineJoinStyle) -> &mut Self
pub fn line_join(&mut self, join: LineJoinStyle) -> &mut Self
Write the LJ
attribute to set the line join style. PDF 1.3+.
sourcepub fn miter_limit(&mut self, limit: f32) -> &mut Self
pub fn miter_limit(&mut self, limit: f32) -> &mut Self
Write the ML
attribute to set the miter limit. PDF 1.3+.
sourcepub fn dash_pattern(
&mut self,
pattern: impl IntoIterator<Item = f32>,
phase: f32,
) -> &mut Self
pub fn dash_pattern( &mut self, pattern: impl IntoIterator<Item = f32>, phase: f32, ) -> &mut Self
Write the D
attribute to set the dash pattern. PDF 1.3+.
sourcepub fn rendering_intent(&mut self, intent: RenderingIntent) -> &mut Self
pub fn rendering_intent(&mut self, intent: RenderingIntent) -> &mut Self
Write the RI
attribute to set the rendering intent. PDF 1.3+.
sourcepub fn overprint(&mut self, overprint: bool) -> &mut Self
pub fn overprint(&mut self, overprint: bool) -> &mut Self
Write the OP
attribute to set the overprint mode for all operations,
except if an op
entry is present. If so, only influence the stroking
operations. PDF 1.2+.
sourcepub fn overprint_fill(&mut self, overprint: bool) -> &mut Self
pub fn overprint_fill(&mut self, overprint: bool) -> &mut Self
Write the op
attribute to set the overprint mode for fill operations.
PDF 1.3+.
sourcepub fn overprint_mode(&mut self, mode: OverprintMode) -> &mut Self
pub fn overprint_mode(&mut self, mode: OverprintMode) -> &mut Self
Write the OPM
attribute to set the overprint mode for components that
have been zeroed out. PDF 1.3+.
Note that this attribute is restricted by PDF/A.
sourcepub fn font(&mut self, font: Name<'_>, size: f32) -> &mut Self
pub fn font(&mut self, font: Name<'_>, size: f32) -> &mut Self
Write the Font
attribute to set the font. PDF 1.3+.
sourcepub fn black_generation(&mut self, func: Ref) -> &mut Self
pub fn black_generation(&mut self, func: Ref) -> &mut Self
Write the BG
attribute to set the black generation function.
sourcepub fn black_generation_default(&mut self) -> &mut Self
pub fn black_generation_default(&mut self) -> &mut Self
Write the BG2
attribute to set the black-generation function back to
the function that has been in effect at the beginning of the page. PDF
1.3+.
sourcepub fn undercolor_removal(&mut self, func: Ref) -> &mut Self
pub fn undercolor_removal(&mut self, func: Ref) -> &mut Self
Write the UCR
attribute to set the undercolor removal function.
sourcepub fn undercolor_removal_default(&mut self) -> &mut Self
pub fn undercolor_removal_default(&mut self) -> &mut Self
Write the UCR2
attribute to set the undercolor removal function back
to the function that has been in effect at the beginning of the page.
PDF 1.3+.
sourcepub fn transfer(&mut self, func: Ref) -> &mut Self
pub fn transfer(&mut self, func: Ref) -> &mut Self
Write the TR
attribute to set the transfer function.
Note that this key is illegal in PDF/A.
sourcepub fn transfer_default(&mut self) -> &mut Self
pub fn transfer_default(&mut self) -> &mut Self
Write the TR2
attribute to set the transfer function back to the
function that has been in effect at the beginning of the page. PDF 1.3+.
sourcepub fn halftone(&mut self, ht: Ref) -> &mut Self
pub fn halftone(&mut self, ht: Ref) -> &mut Self
Write the HT
attribute to set the halftone.
Note that this value may be ignored in PDF/A.
sourcepub fn halftone_default(&mut self) -> &mut Self
pub fn halftone_default(&mut self) -> &mut Self
Write the HT
attribute to set the halftone back to the one that has
been in effect at the beginning of the page.
sourcepub fn flatness(&mut self, tolerance: f32) -> &mut Self
pub fn flatness(&mut self, tolerance: f32) -> &mut Self
Write the FL
attribute to set the flatness tolerance. PDF 1.3+.
Note that this key may be ignored in PDF/A.
sourcepub fn smoothness(&mut self, tolerance: f32) -> &mut Self
pub fn smoothness(&mut self, tolerance: f32) -> &mut Self
Write the SM
attribute to set the smoothness tolerance. PDF 1.3+.
sourcepub fn stroke_adjustment(&mut self, adjust: bool) -> &mut Self
pub fn stroke_adjustment(&mut self, adjust: bool) -> &mut Self
Write the SA
attribute to set automatic stroke adjustment.
sourcepub fn blend_mode(&mut self, mode: BlendMode) -> &mut Self
pub fn blend_mode(&mut self, mode: BlendMode) -> &mut Self
Write the BM
attribute to set the blend mode. PDF 1.4+.
Note that this key is restricted in PDF/A-1.
sourcepub fn soft_mask(&mut self) -> SoftMask<'_>
pub fn soft_mask(&mut self) -> SoftMask<'_>
Start writing the SMask
attribute. PDF 1.4+.
Note that this key is forbidden in PDF/A-1.
sourcepub fn soft_mask_name(&mut self, mask: Name<'_>) -> &mut Self
pub fn soft_mask_name(&mut self, mask: Name<'_>) -> &mut Self
Write the SMask
attribute using a name. PDF 1.4+.
Note that this key is forbidden in PDF/A-1.
sourcepub fn stroking_alpha(&mut self, alpha: f32) -> &mut Self
pub fn stroking_alpha(&mut self, alpha: f32) -> &mut Self
Write the CA
attribute to set the stroking alpha constant. PDF 1.4+.
Note that this key is restricted in PDF/A-1.
sourcepub fn non_stroking_alpha(&mut self, alpha: f32) -> &mut Self
pub fn non_stroking_alpha(&mut self, alpha: f32) -> &mut Self
Write the ca
attribute to set the non-stroking alpha constant. PDF
1.4+.
Note that this key is restricted in PDF/A-1.
sourcepub fn alpha_source(&mut self, source: bool) -> &mut Self
pub fn alpha_source(&mut self, source: bool) -> &mut Self
Write the AIS
attribute to set the alpha source flag. CA
and ca
values as well as the SMask
will be interpreted as shape instead of
opacity. PDF 1.4+.
sourcepub fn text_knockout(&mut self, knockout: bool) -> &mut Self
pub fn text_knockout(&mut self, knockout: bool) -> &mut Self
Write the TK
attribute to set the text knockout flag. PDF 1.4+.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.