Fix horizontal text alignment

This commit is contained in:
Héctor Ramón Jiménez 2025-03-11 00:43:51 +01:00
parent 35c0e14452
commit 179a34d37b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
23 changed files with 141 additions and 67 deletions

View file

@ -10,11 +10,14 @@ pub struct Text {
/// The contents of the text
pub content: String,
/// 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.
pub position: Point,