Struct iced_graphics::geometry::Text
source · pub struct Text {
pub content: String,
pub position: Point,
pub color: Color,
pub size: Pixels,
pub line_height: LineHeight,
pub font: Font,
pub horizontal_alignment: Horizontal,
pub vertical_alignment: Vertical,
pub shaping: Shaping,
}
geometry
only.Expand description
A bunch of text that can be drawn to a canvas
Fields§
§content: String
The contents of the text
position: Point
The position of the text relative to the alignment properties. By default, this position will be relative to the top-left corner coordinate meaning that if the horizontal and vertical alignments are unchanged, this property will tell where the top-left corner of the text should be placed. By changing the horizontal_alignment and vertical_alignment properties, you are are able to change what part of text is placed at this positions. For example, when the horizontal_alignment and vertical_alignment are set to Center, the center of the text will be placed at the given position NOT the top-left coordinate.
color: Color
The color of the text
size: Pixels
The size of the text
line_height: LineHeight
The line height of the text.
font: Font
The font of the text
horizontal_alignment: Horizontal
The horizontal alignment of the text
vertical_alignment: Vertical
The vertical alignment of the text
shaping: Shaping
The shaping strategy of the text.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.