summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-10 20:26:58 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-10 20:26:58 +0200
commitd4cc8c775d4c579aeac69ca2d212a604c67043b0 (patch)
tree90c6bd20a3a0a4a1e471385a536c1333a4b05c99 /src/layout
parentf4ed775df073ceeff292810f19ca8d01b054eff1 (diff)
Move paint and colors into `geom`
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/frame.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/layout/frame.rs b/src/layout/frame.rs
index c74f2abd..0e986fe4 100644
--- a/src/layout/frame.rs
+++ b/src/layout/frame.rs
@@ -4,9 +4,8 @@ use std::rc::Rc;
use serde::{Deserialize, Serialize};
use super::{Constrained, Constraints};
-use crate::color::Color;
use crate::font::FaceId;
-use crate::geom::{Em, Length, Path, Point, Size};
+use crate::geom::{Em, Length, Paint, Path, Point, Size};
use crate::image::ImageId;
/// A finished layout with elements at fixed positions.
@@ -36,7 +35,7 @@ pub enum Element {
/// Shaped text.
Text(Text),
/// A geometric shape and the paint which with it should be filled or
- /// stroked.
+ /// stroked (which one depends on the kind of geometry).
Geometry(Geometry, Paint),
/// A raster image.
Image(ImageId, Size),
@@ -83,13 +82,6 @@ pub enum Geometry {
Path(Path),
}
-/// How a fill or stroke should be painted.
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
-pub enum Paint {
- /// A solid color.
- Color(Color),
-}
-
impl Frame {
/// Create a new, empty frame.
#[track_caller]