[librsvg] text: remove last use of text_gravity_is_vertical



commit 03f059a5eff88c5935440efcce988f2e8d4a5350
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Dec 30 22:02:46 2018 +0100

    text: remove last use of text_gravity_is_vertical
    
    In the other parts of the code we are already checking writing_mode
    directly, so we should just remove the wrapper

 rsvg_internals/src/state.rs | 4 ----
 rsvg_internals/src/text.rs  | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/rsvg_internals/src/state.rs b/rsvg_internals/src/state.rs
index 112d3b53..870adf60 100644
--- a/rsvg_internals/src/state.rs
+++ b/rsvg_internals/src/state.rs
@@ -204,10 +204,6 @@ impl ComputedValues {
             _ => false,
         }
     }
-
-    pub fn text_gravity_is_vertical(&self) -> bool {
-        self.writing_mode.is_vertical()
-    }
 }
 
 macro_rules! compute_value {
diff --git a/rsvg_internals/src/text.rs b/rsvg_internals/src/text.rs
index 7168ed44..b0360f66 100644
--- a/rsvg_internals/src/text.rs
+++ b/rsvg_internals/src/text.rs
@@ -243,7 +243,7 @@ impl PositionedSpan {
             .map(|l| l.normalize(&values, &params))
             .unwrap_or(0.0);
 
-        let (render_x, render_y) = if values.text_gravity_is_vertical() {
+        let (render_x, render_y) = if values.writing_mode.is_vertical() {
             (x + offset + dx, y + dy)
         } else {
             (x + dx, y - offset + dy)


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