[librsvg: 9/13] Create an empty bbox using the obviously right transform
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 9/13] Create an empty bbox using the obviously right transform
- Date: Fri, 5 Nov 2021 04:10:04 +0000 (UTC)
commit 9648a297bf9dc65ab809c7a86e1d6785159d246d
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 4 21:33:02 2021 -0600
Create an empty bbox using the obviously right transform
It *is* the same as the dc.empty_bbox(), but this way we move away
from using the DrawingCtx.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/626>
src/text.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/text.rs b/src/text.rs
index 42bab987f..8b1905c4e 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -810,7 +810,9 @@ impl Draw for Text {
}
}
- let text_bbox = layout_spans.iter().fold(dc.empty_bbox(), |mut bbox, span| {
+ let empty_bbox = BoundingBox::new().with_transform(*transform);
+
+ let text_bbox = layout_spans.iter().fold(empty_bbox, |mut bbox, span| {
if let Some(ref span_bbox) = span.bbox {
bbox.insert(span_bbox);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]