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 more