[librsvg: 30/31] More TODOs




commit ab4e454d4e46c6c8c829daf60d1bad7b877a6d2c
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jun 2 21:01:47 2021 -0500

    More TODOs

 src/drawing_ctx.rs | 4 ++++
 src/length.rs      | 3 +++
 2 files changed, 7 insertions(+)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index e844a7d5..68a3c66a 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -629,6 +629,10 @@ impl DrawingCtx {
                 mask_cr.transform(bbtransform.into());
             }
 
+            // TODO: this is the last place where push_coord_units() is called.  The call to
+            // draw_children below assumes that the new coordinate system is in place.  Can we
+            // pass the ViewParams to with_discrete_layer / Node::draw instead of having them
+            // assume the viewport from the DrawingCtx?
             let _params = self.push_coord_units(mask.get_content_units());
 
             let mut mask_draw_ctx = self.nested(mask_cr);
diff --git a/src/length.rs b/src/length.rs
index 24677f3e..fccb63e0 100644
--- a/src/length.rs
+++ b/src/length.rs
@@ -338,6 +338,9 @@ pub struct NormalizeParams {
 impl NormalizeParams {
     /// Extracts the information needed to normalize `Length` values from a set of
     /// `ComputedValues` and the viewport size in `ViewParams`.
+    // TODO: It is awkward to pass a `ComputedValues` everywhere just to be able to get
+    // the font size in the end.  Can we instead have a `ComputedFontSize(FontSize)`
+    // newtype, extracted from the `ComputedValues`?
     pub fn new(values: &ComputedValues, params: &ViewParams) -> NormalizeParams {
         NormalizeParams {
             vbox: params.vbox,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]