pub struct LayerEffects {
pub version: u32,
pub sections: Vec<(String, Vec<u8>)>,
}Expand description
A parsed LayerEffectInfo blob; sections in file order.
Fields§
§version: u32Format version (2).
sections: Vec<(String, Vec<u8>)>(name, bytes) of each section, in stored order; the bytes follow the name.
Implementations§
Source§impl LayerEffects
impl LayerEffects
Sourcepub fn section_mut(&mut self, name: &str) -> Option<&mut Vec<u8>>
pub fn section_mut(&mut self, name: &str) -> Option<&mut Vec<u8>>
The bytes of a section, mutably.
Sourcepub fn border(&self) -> Option<Border>
pub fn border(&self) -> Option<Border>
The border settings (EffectEdge): on/off (u32), width (f64),
colour as three u32 whose top byte is the 8-bit value.
Sourcepub fn set_border(&mut self, border: Border) -> Result<()>
pub fn set_border(&mut self, border: Border) -> Result<()>
Writes the border settings into EffectEdge (keeping its other bytes). Fails when the blob has no such section.
Sourcepub fn apply_opacity(&self) -> bool
pub fn apply_opacity(&self) -> bool
描画の透明度を反映 (EffectApplyOpacity): the border follows the
layer’s alpha. Defaults to on when the section is missing.
Trait Implementations§
Source§impl Clone for LayerEffects
impl Clone for LayerEffects
Source§impl Debug for LayerEffects
impl Debug for LayerEffects
Source§impl PartialEq for LayerEffects
impl PartialEq for LayerEffects
impl StructuralPartialEq for LayerEffects
Auto Trait Implementations§
impl Freeze for LayerEffects
impl RefUnwindSafe for LayerEffects
impl Send for LayerEffects
impl Sync for LayerEffects
impl Unpin for LayerEffects
impl UnsafeUnpin for LayerEffects
impl UnwindSafe for LayerEffects
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