pub struct TransparencyGroup {
pub isolated: bool,
pub knockout: bool,
pub blend_mode: BlendMode,
pub opacity: f32,
pub color_space: Option<String>,
}Expand description
Transparency group attributes according to ISO 32000-1:2008 Section 11.4.5
Fields§
§isolated: boolWhether the group is isolated from its backdrop When true, the group is composited against a fully transparent backdrop When false, the group inherits the backdrop from its parent
knockout: boolWhether the group is a knockout group When true, objects within the group knock out (replace) earlier objects When false, objects composite normally with each other
blend_mode: BlendModeThe blend mode to apply to the entire group
opacity: f32The opacity to apply to the entire group (0.0 = transparent, 1.0 = opaque)
color_space: Option<String>Optional color space for the group
Implementations§
Source§impl TransparencyGroup
impl TransparencyGroup
Sourcepub fn with_isolated(self, isolated: bool) -> Self
pub fn with_isolated(self, isolated: bool) -> Self
Set whether the group is isolated
Sourcepub fn with_knockout(self, knockout: bool) -> Self
pub fn with_knockout(self, knockout: bool) -> Self
Set whether the group is a knockout group
Sourcepub fn with_blend_mode(self, blend_mode: BlendMode) -> Self
pub fn with_blend_mode(self, blend_mode: BlendMode) -> Self
Set the blend mode for the group
Sourcepub fn with_opacity(self, opacity: f32) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
Set the opacity for the group
Sourcepub fn with_color_space(self, color_space: impl Into<String>) -> Self
pub fn with_color_space(self, color_space: impl Into<String>) -> Self
Set the color space for the group
Sourcepub fn to_dict(&self) -> Dictionary
pub fn to_dict(&self) -> Dictionary
Convert to PDF dictionary representation
Trait Implementations§
Source§impl Clone for TransparencyGroup
impl Clone for TransparencyGroup
Source§fn clone(&self) -> TransparencyGroup
fn clone(&self) -> TransparencyGroup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransparencyGroup
impl Debug for TransparencyGroup
Auto Trait Implementations§
impl Freeze for TransparencyGroup
impl RefUnwindSafe for TransparencyGroup
impl Send for TransparencyGroup
impl Sync for TransparencyGroup
impl Unpin for TransparencyGroup
impl UnwindSafe for TransparencyGroup
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().