[librsvg] node.rs: new method Node::draw_children()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] node.rs: new method Node::draw_children()
- Date: Fri, 17 Mar 2017 02:01:07 +0000 (UTC)
commit 4762790f83d6eef8aa444d3ad21c81dc271edfa1
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 16 19:34:54 2017 -0600
node.rs: new method Node::draw_children()
This will replace _rsvg_node_draw_children()
rust/src/node.rs | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/rust/src/node.rs b/rust/src/node.rs
index 8438146..9bc8676 100644
--- a/rust/src/node.rs
+++ b/rust/src/node.rs
@@ -181,6 +181,26 @@ impl Node {
panic! ("could not downcast");
}
}
+
+ pub fn draw_children (&self, draw_ctx: *const RsvgDrawingCtx, dominate: i32) {
+ if dominate != -1 {
+ drawing_ctx::state_reinherit_top (draw_ctx, self.state, dominate);
+
+ drawing_ctx::push_discrete_layer (draw_ctx);
+ }
+
+ for child in &*self.children.borrow () {
+ let boxed_child = box_node (child.clone ());
+
+ drawing_ctx::draw_node_from_stack (draw_ctx, boxed_child, 0);
+
+ rsvg_node_unref (boxed_child);
+ }
+
+ if dominate != -1 {
+ drawing_ctx::pop_discrete_layer (draw_ctx);
+ }
+ }
}
// Sigh, rsvg_state_free() is only available if we are being linked into
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]