[librsvg: 23/37] NodeText::draw() - Oops, use a layer so the text node gets opacity/filters/etc.
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 23/37] NodeText::draw() - Oops, use a layer so the text node gets opacity/filters/etc.
- Date: Fri, 28 Dec 2018 03:25:54 +0000 (UTC)
commit 7a05488873dcdfc547b96222fd0f70a853296c96
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Oct 31 15:21:39 2018 -0600
NodeText::draw() - Oops, use a layer so the text node gets opacity/filters/etc.
rsvg_internals/src/text.rs | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/text.rs b/rsvg_internals/src/text.rs
index b9ca7ccb..177e37ed 100644
--- a/rsvg_internals/src/text.rs
+++ b/rsvg_internals/src/text.rs
@@ -270,7 +270,7 @@ fn children_to_chunks(chunks: &mut Vec<Chunk>, node: &RsvgNode, cascaded: &Casca
for child in node.children() {
match child.get_type() {
NodeType::Chars => child.with_impl(|chars: &NodeChars| {
- let span = chars.make_span(&child, &values);
+ let span = chars.make_span(&child, values);
let num_chunks = chunks.len();
assert!(num_chunks > 0);
@@ -482,13 +482,16 @@ impl NodeTrait for NodeText {
positioned_chunks.push(positioned);
}
- for chunk in &positioned_chunks {
- for span in &chunk.spans {
- span.draw(draw_ctx, clipping)?;
+ draw_ctx.with_discrete_layer(node, values, clipping, &mut |dc| {
+ for chunk in &positioned_chunks {
+ for span in &chunk.spans {
+ span.draw(dc, clipping)?;
+ }
}
- }
- Ok(())
+ Ok(())
+ })
+
// let params = draw_ctx.get_view_params();
//
// let mut x = self.x.get().normalize(values, ¶ms);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]