Skip to main content

Drawing

Struct Drawing 

Source
pub struct Drawing { /* private fields */ }
Expand description

A scene laid out, in one theme, and made into its display list: kept, so a later scene updates it by what changed. Its layout tree, every node’s box by its id, the property-tree nodes each node made, the list, and the images the list paints.

Implementations§

Source§

impl Drawing

Source

pub fn area(&self) -> Frame

The design’s drawing: its root’s box plus anything painted outside it, cut by any clipping frame, in whole pixels.

Source

pub fn frames(&self) -> Vec<Frame>

Every node’s box, in tree order, in the design’s coordinates.

Source

pub fn theme(&self) -> Theme

The theme the drawing is drawn in.

Source

pub fn action_at(&self, x: f32, y: f32) -> Option<&str>

The interaction of the topmost node at (x, y) — in the design’s coordinates — that has one, where its clipping frames show it.

Trait Implementations§

Auto Trait Implementations§

§

impl !RefUnwindSafe for Drawing

§

impl !Sync for Drawing

§

impl !UnwindSafe for Drawing

§

impl Forget for Drawing

§

impl Freeze for Drawing
where *const u8 is !null: Freeze, PhantomData<Slot<NodeData>>: Freeze, PhantomData<fn(DefaultKey) -> DefaultKey>: Freeze, PhantomData<(u32, Slot<Option<Leaf>>)>: Freeze, PhantomData<Slot<Vec<NodeId>>>: Freeze, PhantomData<Slot<Option<NodeId>>>: Freeze, PhantomData<Option<RunLayout>>: Freeze, PhantomData<u32>: Freeze, *const LeafNode<Vec<OrderKey>, (Owner, NodeId)> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(Vec<OrderKey>, (Owner, NodeId))>>: Freeze, *const LeafNode<Vec<OrderKey>, u32> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, u32)>>: Freeze, *const LeafNode<Vec<OrderKey>, Sens> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, Sens)>>: Freeze, *const LeafNode<Vec<OrderKey>, Frame> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, Frame)>>: Freeze, *const LeafNode<Vec<OrderKey>, Rec> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, Rec)>>: Freeze, PhantomData<(u32, u32)>: Freeze, PhantomData<(u32, f64)>: Freeze, PhantomData<(u32, RunContext)>: Freeze, PhantomData<(NodeId, Vec<OrderKey>)>: Freeze, PhantomData<Option<Transform>>: Freeze, PhantomData<Option<Clip>>: Freeze, PhantomData<Option<Effect>>: Freeze, *const LeafNode<Vec<OrderKey>, Chunk> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, Chunk)>>: Freeze, PhantomData<RTreeNode<Entry>>: Freeze, AABB<[f64; 2]>: Freeze, PhantomData<DefaultParams>: Freeze, *const LeafNode<i64, usize> is !null: Freeze, PhantomData<Box<(i64, usize)>>: Freeze, PhantomData<Option<Run>>: Freeze, *const LeafNode<(u32, OrderKey), SetValZST> is !null: Freeze, PhantomData<Box<((u32, OrderKey), SetValZST)>>: Freeze, PhantomData<(ImageId, ImageData)>: Freeze, PhantomData<ImageData>: Freeze, PhantomData<Painted>: Freeze, *const LeafNode<Vec<OrderKey>, SetValZST> is !null: Freeze, PhantomData<Box<(Vec<OrderKey>, SetValZST)>>: Freeze, PhantomData<u8>: Freeze,

§

impl Move for Drawing

§

impl Unpin for Drawing
where *const u8 is !null: Unpin, *const (): Unpin, Box<Vec<OofCandidate>>: Unpin, Box<TextStyle>: Unpin, Box<[u8]>: Unpin, *const LeafNode<OrderKey, [f32; 4]> is !null: Unpin, Box<(OrderKey, [f32; 4])>: Unpin, *const LeafNode<u32, usize> is !null: Unpin, Box<(u32, usize)>: Unpin, *const LeafNode<OrderKey, Child> is !null: Unpin, Box<(OrderKey, Child)>: Unpin, *const LeafNode<OrderKey, SetValZST> is !null: Unpin, Box<(OrderKey, SetValZST)>: Unpin, Length: Unpin, *const LeafNode<OrderKey, NodeId> is !null: Unpin, Box<(OrderKey, NodeId)>: Unpin, *const LeafNode<Vec<OrderKey>, (Owner, NodeId)> is !null: Unpin, Box<(Vec<OrderKey>, (Owner, NodeId))>: Unpin, *const LeafNode<Vec<OrderKey>, u32> is !null: Unpin, Box<(Vec<OrderKey>, u32)>: Unpin, *const LeafNode<Vec<OrderKey>, Sens> is !null: Unpin, Box<(Vec<OrderKey>, Sens)>: Unpin, *const LeafNode<Vec<OrderKey>, Frame> is !null: Unpin, Box<(Vec<OrderKey>, Frame)>: Unpin, *const LeafNode<Vec<OrderKey>, Rec> is !null: Unpin, Box<(Vec<OrderKey>, Rec)>: Unpin, *const LeafNode<Vec<OrderKey>, Chunk> is !null: Unpin, Box<(Vec<OrderKey>, Chunk)>: Unpin, AABB<[f64; 2]>: Unpin, *const LeafNode<i64, usize> is !null: Unpin, Box<(i64, usize)>: Unpin, Span: Unpin, *const LeafNode<(u32, OrderKey), SetValZST> is !null: Unpin, Box<((u32, OrderKey), SetValZST)>: Unpin, Arc<dyn AsRef<[u8]> + Sync + Send>: Unpin, *const LeafNode<Vec<OrderKey>, SetValZST> is !null: Unpin, Box<(Vec<OrderKey>, SetValZST)>: Unpin,

§

impl UnsafeUnpin for Drawing
where *const u8 is !null: UnsafeUnpin, PhantomData<Slot<NodeData>>: UnsafeUnpin, PhantomData<fn(DefaultKey) -> DefaultKey>: UnsafeUnpin, PhantomData<(u32, Slot<Option<Leaf>>)>: UnsafeUnpin, PhantomData<Slot<Vec<NodeId>>>: UnsafeUnpin, PhantomData<Slot<Option<NodeId>>>: UnsafeUnpin, PhantomData<Option<RunLayout>>: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, (Owner, NodeId)> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, (Owner, NodeId))>>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, u32> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, u32)>>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, Sens> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, Sens)>>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, Frame> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, Frame)>>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, Rec> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, Rec)>>: UnsafeUnpin, PhantomData<(u32, u32)>: UnsafeUnpin, PhantomData<(u32, f64)>: UnsafeUnpin, PhantomData<(u32, RunContext)>: UnsafeUnpin, PhantomData<(NodeId, Vec<OrderKey>)>: UnsafeUnpin, PhantomData<Option<Transform>>: UnsafeUnpin, PhantomData<Option<Clip>>: UnsafeUnpin, PhantomData<Option<Effect>>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, Chunk> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, Chunk)>>: UnsafeUnpin, PhantomData<RTreeNode<Entry>>: UnsafeUnpin, AABB<[f64; 2]>: UnsafeUnpin, PhantomData<DefaultParams>: UnsafeUnpin, *const LeafNode<i64, usize> is !null: UnsafeUnpin, PhantomData<Box<(i64, usize)>>: UnsafeUnpin, PhantomData<Option<Run>>: UnsafeUnpin, *const LeafNode<(u32, OrderKey), SetValZST> is !null: UnsafeUnpin, PhantomData<Box<((u32, OrderKey), SetValZST)>>: UnsafeUnpin, PhantomData<(ImageId, ImageData)>: UnsafeUnpin, PhantomData<ImageData>: UnsafeUnpin, PhantomData<Painted>: UnsafeUnpin, *const LeafNode<Vec<OrderKey>, SetValZST> is !null: UnsafeUnpin, PhantomData<Box<(Vec<OrderKey>, SetValZST)>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.