Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use bevy::{
prelude::{Handle, Image, Vec2},
reflect::Reflect,
};
#[cfg(feature = "svg")]
use bevy_svg::prelude::Svg;
use kayak_font::{Alignment, TextLayout, TextProperties};
use super::Edge;
#[derive(Debug, Reflect, Clone, PartialEq)]
pub enum RenderCommand {
Empty,
/// Represents a node that has no renderable object but contributes to the layout.
Layout,
Clip,
Quad,
Text {
content: String,
alignment: Alignment,
word_wrap: bool,
subpixel: bool,
text_layout: TextLayout,
properties: TextProperties,
},
Image {
handle: Handle<Image>,
},
TextureAtlas {
position: Vec2,
size: Vec2,
handle: Handle<Image>,
},
NinePatch {
border: Edge<f32>,
handle: Handle<Image>,
scale: f32,
},
#[cfg(feature = "svg")]
Svg {
handle: Handle<Svg>,
},
}
impl Default for RenderCommand {
fn default() -> Self {
Self::Empty
}
}