Skip to content

Commit e38181b

Browse files
authored
Add missing qimage methods (#818)
1 parent 34f381b commit e38181b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ mod ffi {
168168
#[rust_name = "set_alpha_channel"]
169169
fn setAlphaChannel(self: &mut QImage, alphaChannel: &QImage);
170170

171+
/// Sets the number of pixels that fit horizontally in a physical meter, to x.
172+
#[rust_name = "set_dots_per_meter_x"]
173+
fn setDotsPerMeterX(self: &mut QImage, x: i32);
174+
175+
/// Sets the number of pixels that fit vertically in a physical meter, to y.
176+
#[rust_name = "set_dots_per_meter_y"]
177+
fn setDotsPerMeterY(self: &mut QImage, y: i32);
178+
171179
/// Sets the number of pixels by which the image is intended to be offset by when positioning relative to other images, to offset.
172180
#[rust_name = "set_offset"]
173181
fn setOffset(self: &mut QImage, point: &QPoint);
@@ -182,6 +190,10 @@ mod ffi {
182190
/// Swaps image other with this image. This operation is very fast and never fails.
183191
fn swap(self: &mut QImage, other: &mut QImage);
184192

193+
/// Changes the format of the image to format without changing the data. Only works between formats of the same depth.
194+
#[rust_name = "reinterpret_as_format"]
195+
fn reinterpretAsFormat(self: &mut QImage, format: QImageFormat) -> bool;
196+
185197
/// Returns the number of pixels by which the image is intended to be offset by when positioning relative to other images.
186198
fn offset(self: &QImage) -> QPoint;
187199

0 commit comments

Comments
 (0)