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
32
33
34
35
36
37
38
39
40
41
42
43
44
use std::fmt;
glib::wrapper! {
#[doc(alias = "PangoGlyphGeometry")]
pub struct GlyphGeometry(BoxedInline<ffi::PangoGlyphGeometry>);
}
impl GlyphGeometry {
pub fn width(&self) -> i32 {
self.inner.width
}
pub fn set_width(&mut self, width: i32) {
self.inner.width = width;
}
pub fn x_offset(&self) -> i32 {
self.inner.x_offset
}
pub fn set_x_offset(&mut self, x_offset: i32) {
self.inner.x_offset = x_offset;
}
pub fn y_offset(&self) -> i32 {
self.inner.y_offset
}
pub fn set_y_offset(&mut self, y_offset: i32) {
self.inner.y_offset = y_offset;
}
}
impl fmt::Debug for GlyphGeometry {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("GlyphGeometry")
.field("x_offset", &self.x_offset())
.field("y_offset", &self.y_offset())
.field("width", &self.width())
.finish()
}
}