From 4c42514e33ea91dc44b5021f3bd58318c20d4e79 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 9 Feb 2024 10:14:40 +0100 Subject: [PATCH] Add missing translated method --- crates/cxx-qt-lib/src/gui/qpolygon.rs | 3 +++ crates/cxx-qt-lib/src/gui/qpolygonf.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/crates/cxx-qt-lib/src/gui/qpolygon.rs b/crates/cxx-qt-lib/src/gui/qpolygon.rs index 83bc7d134..74b41ff60 100644 --- a/crates/cxx-qt-lib/src/gui/qpolygon.rs +++ b/crates/cxx-qt-lib/src/gui/qpolygon.rs @@ -50,6 +50,9 @@ mod ffi { /// Translates all points in the polygon by (dx, dy). fn translate(self: &mut QPolygon, dx: i32, dy: i32); + /// Returns a copy of the polygon that is translated by (dx, dy). + fn translated(self: &QPolygon, dx: i32, dy: i32) -> QPolygon; + /// Returns a polygon which is the union of this polygon and r. fn united(self: &QPolygon, r: &QPolygon) -> QPolygon; } diff --git a/crates/cxx-qt-lib/src/gui/qpolygonf.rs b/crates/cxx-qt-lib/src/gui/qpolygonf.rs index 071a486d9..5fdfd862c 100644 --- a/crates/cxx-qt-lib/src/gui/qpolygonf.rs +++ b/crates/cxx-qt-lib/src/gui/qpolygonf.rs @@ -53,6 +53,9 @@ mod ffi { /// Translates all points in the polygon by (dx, dy). fn translate(self: &mut QPolygonF, dx: f64, dy: f64); + /// Returns a copy of the polygon that is translated by (dx, dy). + fn translated(self: &QPolygonF, dx: f64, dy: f64) -> QPolygonF; + /// Returns a polygon which is the union of this polygon and r. fn united(self: &QPolygonF, r: &QPolygonF) -> QPolygonF; }