Readjusted namespaces, removed Geometry example as it's no longer relevant.
This commit is contained in:
parent
6e7b3ced0b
commit
30432cbade
27 changed files with 394 additions and 625 deletions
26
graphics/src/layer/text.rs
Normal file
26
graphics/src/layer/text.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use crate::{alignment, Font, Rectangle};
|
||||
|
||||
/// A paragraph of text.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Text<'a> {
|
||||
/// The content of the [`Text`].
|
||||
pub content: &'a str,
|
||||
|
||||
/// The layout bounds of the [`Text`].
|
||||
pub bounds: Rectangle,
|
||||
|
||||
/// The color of the [`Text`], in __linear RGB_.
|
||||
pub color: [f32; 4],
|
||||
|
||||
/// The size of the [`Text`].
|
||||
pub size: f32,
|
||||
|
||||
/// The font of the [`Text`].
|
||||
pub font: Font,
|
||||
|
||||
/// The horizontal alignment of the [`Text`].
|
||||
pub horizontal_alignment: alignment::Horizontal,
|
||||
|
||||
/// The vertical alignment of the [`Text`].
|
||||
pub vertical_alignment: alignment::Vertical,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue