[librsvg: 9/15] PositionedSpan::draw - pass the ViewParams as an argument
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 9/15] PositionedSpan::draw - pass the ViewParams as an argument
- Date: Mon, 18 Oct 2021 23:15:47 +0000 (UTC)
commit 92dd748118b99bb80a1481be37bec3f779fe69e9
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Oct 18 12:45:59 2021 -0500
PositionedSpan::draw - pass the ViewParams as an argument
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/613>
src/text.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/text.rs b/src/text.rs
index 216a521b..bf69aae0 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -332,10 +332,10 @@ impl PositionedSpan {
&self,
acquired_nodes: &mut AcquiredNodes<'_>,
draw_ctx: &mut DrawingCtx,
+ view_params: &ViewParams,
clipping: bool,
link_target: Option<String>,
) -> Result<BoundingBox, RenderingError> {
- let view_params = draw_ctx.get_view_params();
let params = NormalizeParams::new(&self.values, &view_params);
let layout = self.layout.clone();
@@ -677,9 +677,11 @@ impl Draw for Text {
let mut bbox = dc.empty_bbox();
+ let view_params = dc.get_view_params();
+
for chunk in &positioned_chunks {
for span in &chunk.spans {
- let span_bbox = span.draw(an, dc, clipping, chunk.link.clone())?;
+ let span_bbox = span.draw(an, dc, &view_params, clipping, chunk.link.clone())?;
bbox.insert(&span_bbox);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]