Skip to main content

engage/generated/unity_engine/text_core/
glyphmetrics.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-text_core-glyphmetrics-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/text_core/glyphmetrics/GlyphMetrics.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct GlyphMetrics {
17        pub m_width: f32,
18        pub m_height: f32,
19        pub m_horizontal_bearing_x: f32,
20        pub m_horizontal_bearing_y: f32,
21        pub m_horizontal_advance: f32,
22    }
23    impl ::unity::ClassIdentity for GlyphMetrics {
24        const NAME: &'static str = "GlyphMetrics";
25        const NAMESPACE: &'static str = "UnityEngine.TextCore";
26
27        fn class() -> ::unity::Class {
28            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
29            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
30        }
31    }
32    impl ::unity::IlType for GlyphMetrics {
33        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35        }
36    }
37}
38
39#[cfg(feature = "unity_engine-text_core-glyphmetrics-types")]
40pub use __types::*;
41
42#[cfg(feature = "unity_engine-text_core-glyphmetrics")]
43impl GlyphMetrics {
44    #[doc = "`get_width()` overload"]
45    pub fn get_width(&mut self) -> f32 {
46        unsafe {
47            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e330usize)as*mut u8,f32;
48(*mut GlyphMetrics)self as*mut GlyphMetrics)
49        }
50    }
51
52    #[doc = "`get_height()` overload"]
53    pub fn get_height(&mut self) -> f32 {
54        unsafe {
55            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e340usize)as*mut u8,f32;
56(*mut GlyphMetrics)self as*mut GlyphMetrics)
57        }
58    }
59
60    #[doc = "`get_horizontalBearingX()` overload"]
61    pub fn get_horizontal_bearing_x(&mut self) -> f32 {
62        unsafe {
63            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e350usize)as*mut u8,f32;
64(*mut GlyphMetrics)self as*mut GlyphMetrics)
65        }
66    }
67
68    #[doc = "`get_horizontalBearingY()` overload"]
69    pub fn get_horizontal_bearing_y(&mut self) -> f32 {
70        unsafe {
71            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e360usize)as*mut u8,f32;
72(*mut GlyphMetrics)self as*mut GlyphMetrics)
73        }
74    }
75
76    #[doc = "`get_horizontalAdvance()` overload"]
77    pub fn get_horizontal_advance(&mut self) -> f32 {
78        unsafe {
79            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e370usize)as*mut u8,f32;
80(*mut GlyphMetrics)self as*mut GlyphMetrics)
81        }
82    }
83
84    #[doc = "`.ctor(f32, f32, f32, f32, f32)` overload"]
85    pub fn ctor(
86        &mut self,
87        width: impl ::core::convert::Into<f32>,
88        height: impl ::core::convert::Into<f32>,
89        bearing_x: impl ::core::convert::Into<f32>,
90        bearing_y: impl ::core::convert::Into<f32>,
91        advance: impl ::core::convert::Into<f32>,
92    ) -> () {
93        unsafe {
94            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e380usize)as*mut u8,();
95(*mut GlyphMetrics)self as*mut GlyphMetrics,(f32)::core::convert::Into::into(width),(f32)::core::convert::Into::into(height),(f32)::core::convert::Into::into(bearing_x),(f32)::core::convert::Into::into(bearing_y),(f32)::core::convert::Into::into(advance))
96        }
97    }
98
99    #[doc = "`GetHashCode()` overload"]
100    pub fn get_hash_code(&mut self) -> i32 {
101        unsafe {
102            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e3a0usize)as*mut u8,i32;
103(*mut GlyphMetrics)self as*mut GlyphMetrics)
104        }
105    }
106
107    #[doc = "`Equals(crate::system::object::Object)` overload"]
108    pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
109        unsafe {
110            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e420usize)as*mut u8,bool;
111(*mut GlyphMetrics)self as*mut GlyphMetrics,(crate::system::object::Object)::core::convert::Into::into(obj))
112        }
113    }
114
115    #[doc = "`Equals(crate::unity_engine::text_core::glyphmetrics::GlyphMetrics)` overload"]
116    pub fn equals_2(&mut self, other: impl ::core::convert::Into<crate::unity_engine::text_core::glyphmetrics::GlyphMetrics>) -> bool {
117        unsafe {
118            ::unity::il2cpp_call!((::unity::module_base()+0x3f2e4b0usize)as*mut u8,bool;
119(*mut GlyphMetrics)self as*mut GlyphMetrics,(crate::unity_engine::text_core::glyphmetrics::GlyphMetrics)::core::convert::Into::into(other))
120        }
121    }
122}
123
124#[cfg(feature = "unity_engine-text_core-glyphmetrics")]
125impl GlyphMetrics {
126    pub fn get_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
128    }
129
130    pub fn get_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
131        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
132    }
133
134    pub fn get_horizontal_bearing_x_method_info() -> &'static ::unity::il2cpp::MethodInfo {
135        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
136    }
137
138    pub fn get_horizontal_bearing_y_method_info() -> &'static ::unity::il2cpp::MethodInfo {
139        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
140    }
141
142    pub fn get_horizontal_advance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
143        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
144    }
145
146    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
147        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
148    }
149
150    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
151        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
152    }
153
154    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
155        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
156    }
157
158    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
159        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
160    }
161}
162
163#[cfg(feature = "unity_engine-text_core-glyphmetrics")]
164#[doc(hidden)]
165pub mod prelude {
166    pub use super::GlyphMetrics;
167    #[cfg(feature = "system-object")]
168    pub use crate::system::object::IObjectMethods;
169    #[cfg(feature = "system-valuetype")]
170    pub use crate::system::valuetype::IValueTypeMethods;
171    pub use crate::system::{object::IObject, valuetype::IValueType};
172}