pub enum DebugDrawCmd {
RectOutline {
rect: DebugRect,
color: DebugColor,
thickness: f32,
},
RectFill {
rect: DebugRect,
color: DebugColor,
},
TextLabel {
pos: DebugPoint,
text: String,
color: DebugColor,
},
}Expand description
Backend-neutral overlay primitive derived from hover, selection, or warnings.
All positions and thicknesses are logical pixels.
§Examples
use ailloli_ui_devtools_core::{DebugColor, DebugDrawCmd, DebugRect};
let cmd = DebugDrawCmd::RectOutline { rect: DebugRect { x: 0.0, y: 0.0, w: 10.0, h: 10.0 },
color: DebugColor { r: 1.0, g: 0.0, b: 0.0, a: 1.0 }, thickness: 2.0 };
assert!(matches!(cmd, DebugDrawCmd::RectOutline { thickness: 2.0, .. }));Variants§
RectOutline
Stroked rectangle overlay.
Fields
§
color: DebugColorStroke color.
RectFill
Filled rectangle overlay.
TextLabel
Text label anchored at a logical viewport point.
Trait Implementations§
Source§impl Clone for DebugDrawCmd
impl Clone for DebugDrawCmd
Source§fn clone(&self) -> DebugDrawCmd
fn clone(&self) -> DebugDrawCmd
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DebugDrawCmd
impl Debug for DebugDrawCmd
Source§impl<'de> Deserialize<'de> for DebugDrawCmd
impl<'de> Deserialize<'de> for DebugDrawCmd
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DebugDrawCmd
impl PartialEq for DebugDrawCmd
Source§impl Serialize for DebugDrawCmd
impl Serialize for DebugDrawCmd
impl StructuralPartialEq for DebugDrawCmd
Auto Trait Implementations§
impl Freeze for DebugDrawCmd
impl RefUnwindSafe for DebugDrawCmd
impl Send for DebugDrawCmd
impl Sync for DebugDrawCmd
impl Unpin for DebugDrawCmd
impl UnwindSafe for DebugDrawCmd
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.