diff options
Diffstat (limited to 'tiny_skia/src/geometry.rs')
-rw-r--r-- | tiny_skia/src/geometry.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs index 1d14aa03..b73f84a9 100644 --- a/tiny_skia/src/geometry.rs +++ b/tiny_skia/src/geometry.rs @@ -109,15 +109,17 @@ impl Frame { Point::new(transformed[0].x, transformed[0].y) }; + let bounds = Rectangle { + x: position.x, + y: position.y, + width: f32::INFINITY, + height: f32::INFINITY, + }; + // TODO: Use vectorial text instead of primitive self.primitives.push(Primitive::Text { content: text.content, - bounds: Rectangle { - x: position.x, - y: position.y, - width: f32::INFINITY, - height: f32::INFINITY, - }, + bounds, color: text.color, size: text.size, line_height: text.line_height, @@ -125,6 +127,7 @@ impl Frame { horizontal_alignment: text.horizontal_alignment, vertical_alignment: text.vertical_alignment, shaping: text.shaping, + viewport: bounds, }); } |