1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::{RenderNodeType, TextNode};
define_render_node!(TextNode, ffi::GskTextNode, RenderNodeType::TextNode);
impl std::fmt::Debug for TextNode {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
#[cfg(feature = "v4_2")]
{
f.debug_struct("TextNode")
.field("color", &self.color())
.field("glyphs", &self.glyphs())
.field("num_glyphs", &self.num_glyphs())
.field("font", &self.font())
.field("offset", &self.offset())
.field("has_color_glyphs", &self.has_color_glyphs())
.finish()
}
#[cfg(not(feature = "v4_2"))]
{
f.debug_struct("TextNode")
.field("color", &self.color())
.field("glyphs", &self.glyphs())
.field("num_glyphs", &self.num_glyphs())
.field("font", &self.font())
.field("offset", &self.offset())
.finish()
}
}
}