Struct pdf_writer::writers::SoftMask
source · pub struct SoftMask<'a> { /* private fields */ }
Expand description
Writer for a soft mask dictionary.
This struct is created by ExtGraphicsState::soft_mask
.
Implementations§
source§impl<'a> SoftMask<'a>
impl<'a> SoftMask<'a>
sourcepub fn subtype(&mut self, subtype: MaskType) -> &mut Self
pub fn subtype(&mut self, subtype: MaskType) -> &mut Self
Write the S
attribute to set the soft mask subtype. Required.
sourcepub fn group(&mut self, group: Ref) -> &mut Self
pub fn group(&mut self, group: Ref) -> &mut Self
Write the G
attribute to set the transparency group XObject. The group
has to have a color space set in the /CS
attribute if the mask subtype
is Luminosity
. Required.
sourcepub fn backdrop(&mut self, color: impl IntoIterator<Item = f32>) -> &mut Self
pub fn backdrop(&mut self, color: impl IntoIterator<Item = f32>) -> &mut Self
Write the BC
attribute to set the background color for the
transparency group. Only applicable if the mask subtype is Luminosity
.
Has to be set in the group’s color space.
sourcepub fn transfer_function(&mut self, function: Ref) -> &mut Self
pub fn transfer_function(&mut self, function: Ref) -> &mut Self
Write the TR
attribute, a function that maps from the group’s output
values to the mask opacity.
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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SoftMask<'a>
impl<'a> RefUnwindSafe for SoftMask<'a>
impl<'a> Send for SoftMask<'a>
impl<'a> Sync for SoftMask<'a>
impl<'a> Unpin for SoftMask<'a>
impl<'a> !UnwindSafe for SoftMask<'a>
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