pub enum AnchoredContent {
Image {
media_id: MediaId,
},
Shape {
preset: ShapePreset,
fill: Option<Color>,
text: Vec<ParagraphBlock>,
},
}Expand description
The drawable content of an anchored drawing.
Variants§
Image
A picture resolved to its content-addressed shared media identity.
Shape
A shape: preset geometry, an optional fill, and optional text.
The text arrives already laid out, because breaking it into lines needs a font manager and that only exists in the engine.
Fields
§
preset: ShapePresetPreset geometry we recognise.
§
fill: Option<Color>Fill colour, or None for a:noFill and for fills we cannot
resolve. An unfilled shape draws no body, only its text.
§
text: Vec<ParagraphBlock>Laid-out paragraphs of the shape’s text box.
Trait Implementations§
Source§impl Clone for AnchoredContent
impl Clone for AnchoredContent
Source§fn clone(&self) -> AnchoredContent
fn clone(&self) -> AnchoredContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnchoredContent
impl RefUnwindSafe for AnchoredContent
impl Send for AnchoredContent
impl Sync for AnchoredContent
impl Unpin for AnchoredContent
impl UnsafeUnpin for AnchoredContent
impl UnwindSafe for AnchoredContent
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