We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d25fbe commit f875205Copy full SHA for f875205
src/rect.rs
@@ -86,6 +86,10 @@ impl IRect {
86
pub fn intersect(&self, rect: &Self) -> Self {
87
unsafe { fz_intersect_irect((*self).into(), (*rect).into()) }.into()
88
}
89
+
90
+ pub fn translate(&self, xoff: i32, yoff: i32) -> Self {
91
+ unsafe { fz_translate_irect((*self).into(), xoff, yoff) }.into()
92
+ }
93
94
95
impl fmt::Display for IRect {
@@ -203,6 +207,10 @@ impl Rect {
203
207
204
208
unsafe { fz_intersect_rect((*self).into(), (*rect).into()) }.into()
205
209
210
211
+ pub fn translate(&self, xoff: f32, yoff: f32) -> Self {
212
+ unsafe { fz_translate_rect((*self).into(), xoff, yoff) }.into()
213
206
214
215
216
impl fmt::Display for Rect {
0 commit comments