Struct qmetaobject::QImage
source · #[repr(C)]pub struct QImage { /* private fields */ }
Expand description
Wrapper around QImage
class.
Implementations§
source§impl QImage
impl QImage
sourcepub fn load_from_file(filename: QString) -> QImage
pub fn load_from_file(filename: QString) -> QImage
Wrapper around QImage(const QString &fileName, const char *format = nullptr)
constructor.
sourcepub fn new(size: QSize, format: ImageFormat) -> QImage
pub fn new(size: QSize, format: ImageFormat) -> QImage
Wrapper around QImage(const QSize &, QImage::Format)
constructor.
sourcepub fn format(&self) -> ImageFormat
pub fn format(&self) -> ImageFormat
Wrapper around format()
method.
sourcepub fn fill(&mut self, color: QColor)
pub fn fill(&mut self, color: QColor)
Wrapper around fill(const QColor &)
method.
sourcepub fn set_pixel_color(&mut self, x: u32, y: u32, color: QColor)
pub fn set_pixel_color(&mut self, x: u32, y: u32, color: QColor)
Wrapper around setPixelColor(const QPoint &, const QColor &)
method.
sourcepub fn get_pixel_color(&self, x: u32, y: u32) -> QColor
pub fn get_pixel_color(&self, x: u32, y: u32) -> QColor
Wrapper around pixelColor(const QPoint &)
method.
Trait Implementations§
source§impl PartialEq for QImage
impl PartialEq for QImage
source§impl QMetaType for QImage
impl QMetaType for QImage
fn id() -> i32
source§fn to_qvariant(&self) -> QVariant
fn to_qvariant(&self) -> QVariant
Returns a QVariant containing a copy of this object
source§fn from_qvariant(variant: QVariant) -> Option<Self>
fn from_qvariant(variant: QVariant) -> Option<Self>
Attempt to convert from a QVariant to this type.
source§const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString> = None
const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString> = None
If this is set to a function, it enable the conversion to and from QString
const CONVERSION_FROM_STRING: Option<fn(_: &QString) -> Self> = None
Auto Trait Implementations§
impl RefUnwindSafe for QImage
impl Send for QImage
impl Sync for QImage
impl Unpin for QImage
impl UnwindSafe for QImage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more