summaryrefslogtreecommitdiffstats
path: root/graphics/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-09-20 15:54:19 +0700
committerLibravatar GitHub <noreply@github.com>2021-09-20 15:54:19 +0700
commit35c4ad6dd950fa91d181f4d3253fcb486bcf1b11 (patch)
tree8420a91cd319a63b1ed257a6334453a1a673bdfb /graphics/src/layer.rs
parent456a3f15e4226cc781a8825bddaaf066476d4351 (diff)
parenta0ad3996225601aaa1ebe051cba115374b55c80e (diff)
downloadiced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.gz
iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.bz2
iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.zip
Merge pull request #1044 from tarkah/feature/align-fill-variant
Add Align::Fill variant
Diffstat (limited to 'graphics/src/layer.rs')
-rw-r--r--graphics/src/layer.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs
index 7dce1d4c..9653a2e4 100644
--- a/graphics/src/layer.rs
+++ b/graphics/src/layer.rs
@@ -1,10 +1,10 @@
//! Organize rendering primitives into a flattened list of layers.
+use crate::alignment;
use crate::image;
use crate::svg;
use crate::triangle;
use crate::{
- Background, Font, HorizontalAlignment, Point, Primitive, Rectangle, Size,
- Vector, VerticalAlignment, Viewport,
+ Background, Font, Point, Primitive, Rectangle, Size, Vector, Viewport,
};
/// A group of primitives that should be clipped together.
@@ -55,8 +55,8 @@ impl<'a> Layer<'a> {
color: [0.9, 0.9, 0.9, 1.0],
size: 20.0,
font: Font::Default,
- horizontal_alignment: HorizontalAlignment::Left,
- vertical_alignment: VerticalAlignment::Top,
+ horizontal_alignment: alignment::Horizontal::Left,
+ vertical_alignment: alignment::Vertical::Top,
};
overlay.text.push(text);
@@ -293,10 +293,10 @@ pub struct Text<'a> {
pub font: Font,
/// The horizontal alignment of the [`Text`].
- pub horizontal_alignment: HorizontalAlignment,
+ pub horizontal_alignment: alignment::Horizontal,
/// The vertical alignment of the [`Text`].
- pub vertical_alignment: VerticalAlignment,
+ pub vertical_alignment: alignment::Vertical,
}
/// A raster or vector image.