diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-09 17:25:25 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-09 17:25:25 +0100 |
| commit | b2b8d37ce03de60582230e03c03efa356b6f31d3 (patch) | |
| tree | 19d24ae6e70f5bcae0e7461983a384634598da97 /src/layout/mod.rs | |
| parent | a0de9aad07dda202097705d4e0f5220103686c0f (diff) | |
Rename run to line and add some explanatory comments ✏
The name run was a relict of the time where a line consisted of a set of runs with same alignment. While these runs still exist conceptually, they are all stored flatly together in what was now renamed from `run` to `line`.
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 1974b578..622b0363 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -229,15 +229,6 @@ pub enum Element { Geometry(Geometry), } -/// The kind of graphic fill to be applied to a [`Shape`]. -#[derive(Debug, Clone, PartialEq)] -pub enum Fill { - /// The fill is a color. - Color(Color), - /// The fill is an image. - Image(Image), -} - /// A shape with some kind of fill. #[derive(Debug, Clone, PartialEq)] pub struct Geometry { @@ -258,8 +249,17 @@ pub enum Shape { Rect(Size), } +/// The kind of graphic fill to be applied to a [`Shape`]. +#[derive(Debug, Copy, Clone, PartialEq)] +pub enum Fill { + /// The fill is a color. + Color(Color), + /// The fill is an image. + Image(Image), +} + /// An image element. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq)] pub struct Image { /// The image resource. pub res: ResourceId, |
