Skip to content

Commit bf7c760

Browse files
authored
Add missing qpainter methods (#834)
* Add missing qpainter methods * Remove unsafe endNativePainting/beginNativePainting + rename method
1 parent 056d93e commit bf7c760

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/cxx-qt-lib/src/gui/qpainter.rs

+8
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ mod ffi {
119119
#[rust_name = "draw_polyline"]
120120
fn drawPolyline(self: Pin<&mut QPainter>, points: &QPolygon);
121121

122+
/// Draws the current rectangle with the current pen and brush.
123+
#[rust_name = "draw_rect_f"]
124+
fn drawRect(self: Pin<&mut QPainter>, rectangle: &QRectF);
125+
122126
/// Draws the given text with the currently defined text direction, beginning at the given position.
123127
#[rust_name = "draw_text"]
124128
fn drawText(self: Pin<&mut QPainter>, point: &QPoint, text: &QString);
@@ -212,6 +216,10 @@ mod ffi {
212216
/// Translates the coordinate system by the given offset.
213217
fn translate(self: Pin<&mut QPainter>, offset: &QPoint);
214218

219+
/// Returns true if view transformation is enabled; otherwise returns false.
220+
#[rust_name = "view_transform_enabled"]
221+
fn viewTransformEnabled(self: &QPainter) -> bool;
222+
215223
/// Returns the window rectangle.
216224
fn window(self: &QPainter) -> QRect;
217225
}

0 commit comments

Comments
 (0)