[librsvg: 19/22] Rename variable




commit 75aae867bb3ab3d5caf5396880d5503ef9de9fef
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Sep 23 11:46:38 2021 -0500

    Rename variable
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/593>

 src/text.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/text.rs b/src/text.rs
index 96659172..61096e84 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -120,17 +120,17 @@ impl PositionedChunk {
     ) -> PositionedChunk {
         let mut positioned = Vec::new();
 
-        // Adjust the specified coordinates with the text_anchor
-
-        let adjusted_advance = text_anchor_offset(
+        // measured.advance is the size of the chunk.  Compute the offsets needed to align
+        // it per the text-anchor property (start, middle, end):
+        let anchor_offset = text_anchor_offset(
             measured.values.text_anchor(),
             measured.values.direction(),
             text_is_horizontal,
             measured.advance,
         );
 
-        let mut x = x + adjusted_advance.0;
-        let mut y = y + adjusted_advance.1;
+        let mut x = x + anchor_offset.0;
+        let mut y = y + anchor_offset.1;
 
         // Position each span
 


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