Skip to content

Commit 64bfc4c

Browse files
gsk: Handle new render nodes
1 parent bc4623b commit 64bfc4c

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

gsk4/src/fill_node.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Take a look at the license at the top of the repository in the LICENSE file.
2+
3+
use crate::{FillNode, RenderNodeType};
4+
5+
define_render_node!(FillNode, ffi::GskFillNode, RenderNodeType::FillNode);
6+
7+
impl std::fmt::Debug for FillNode {
8+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9+
f.debug_struct("FillNode")
10+
.field("child", &self.child())
11+
.field("fill_rule", &self.fill_rule())
12+
.field("path", &self.path())
13+
.finish()
14+
}
15+
}

gsk4/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ mod conic_gradient_node;
4545
mod container_node;
4646
mod cross_fade_node;
4747
mod debug_node;
48+
#[cfg(feature = "v4_14")]
49+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
50+
mod fill_node;
4851
mod gl_shader;
4952
mod gl_shader_node;
5053
mod inset_shadow_node;
@@ -64,6 +67,9 @@ mod repeating_linear_gradient_node;
6467
mod repeating_radial_gradient_node;
6568
mod rounded_clip_node;
6669
mod shadow_node;
70+
#[cfg(feature = "v4_14")]
71+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
72+
mod stroke_node;
6773
mod text_node;
6874
mod texture_node;
6975
#[cfg(feature = "v4_10")]

gsk4/src/stroke_node.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Take a look at the license at the top of the repository in the LICENSE file.
2+
3+
use crate::{RenderNodeType, StrokeNode};
4+
5+
define_render_node!(StrokeNode, ffi::GskStrokeNode, RenderNodeType::StrokeNode);
6+
7+
impl std::fmt::Debug for StrokeNode {
8+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9+
f.debug_struct("StrokeNode")
10+
.field("child", &self.child())
11+
.field("stroke", &self.stroke())
12+
.field("path", &self.path())
13+
.finish()
14+
}
15+
}

0 commit comments

Comments
 (0)