#[non_exhaustive]pub enum ObjectKind {
Image(ImageSource),
Video(VideoSource),
Text(TextRun),
Shape(Shape),
Group(Vec<ObjectId>),
Live(LiveStreamHandle),
Vector(VectorFrame),
}Expand description
What a scene object IS.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Image(ImageSource)
Video(VideoSource)
Text(TextRun)
Shape(Shape)
Group(Vec<ObjectId>)
Live(LiveStreamHandle)
Vector(VectorFrame)
Vector content — a self-contained
oxideav_core::VectorFrame. Renders natively to vector
outputs (PDF / SVG writers consume the VectorFrame as-is)
and rasterises through oxideav_raster::Renderer for
raster outputs (PNG / MP4 / RTMP); see
crate::raster::rasterize_vector for the helper. The
rasteriser also picks up Group::cache_key automatically
when the same sub-tree is re-rendered.
Implementations§
Source§impl ObjectKind
impl ObjectKind
Sourcepub fn content_size(&self) -> Option<(f32, f32)>
pub fn content_size(&self) -> Option<(f32, f32)>
Object-local content extent for the kinds that carry one intrinsically.
ObjectKind::Vector— the underlyingoxideav_core::VectorFrame’s viewport(width, height).ObjectKind::Shape— delegates toShape::content_size.ObjectKind::Live— the source’shint_size, cast tof32when present.ObjectKind::Image,ObjectKind::Video,ObjectKind::Text,ObjectKind::Group— returnNone. These kinds either pull their extent from a frame the renderer fetches at render time (image / video / live without a hint), from a shaping engine the scene crate doesn’t bind (text), or from their referenced children resolved against a scene (group). Callers wanting a geometry estimate for these kinds pass a fallback intoSceneObject::bbox.
Trait Implementations§
Source§impl Clone for ObjectKind
impl Clone for ObjectKind
Source§fn clone(&self) -> ObjectKind
fn clone(&self) -> ObjectKind
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 ObjectKind
impl RefUnwindSafe for ObjectKind
impl Send for ObjectKind
impl Sync for ObjectKind
impl Unpin for ObjectKind
impl UnsafeUnpin for ObjectKind
impl UnwindSafe for ObjectKind
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