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
sourceimpl<'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
S
: Set the soft mask subtype. Required.
sourcepub fn group(&mut self, group: Ref) -> &mut Self
pub fn group(&mut self, group: Ref) -> &mut Self
G
: Set the soft mask. Must be a 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
BC
: 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
TR
: A function that maps from the group’s output values to the mask
opacity.
Methods from Deref<Target = Dict<'a>>
Trait Implementations
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more