pub struct IPicture(/* private fields */);
Available on crate feature
ole
only.Expand description
IPicture
COM interface over IPictureVT
.
Automatically calls
Release
when the object goes out of scope.
§Examples
Loading an image from bytes:
ⓘ
use winsafe::{self as w, prelude::*};
let image_bytes: Vec<u8>; // initialized somewhere
let stream = w::SHCreateMemStream(&image_bytes)?;
let ipic = w::OleLoadPicture(&stream, None, true)?;
Trait Implementations§
source§impl ole_IPicture for IPicture
impl ole_IPicture for IPicture
source§fn get_Height(&self) -> HrResult<i32>
fn get_Height(&self) -> HrResult<i32>
IPicture::get_Height
method. Read moresource§fn PictureChanged(&self) -> HrResult<()>
fn PictureChanged(&self) -> HrResult<()>
IPicture::PictureChanged
method.source§fn put_KeepOriginalFormat(&self, keep: bool) -> HrResult<()>
fn put_KeepOriginalFormat(&self, keep: bool) -> HrResult<()>
IPicture::put_KeepOriginalFormat
method.source§fn Render(
&self,
hdc: &HDC,
dest_pt: POINT,
dest_sz: SIZE,
src_offset: Option<POINT>,
src_extent: SIZE,
metafile_bounds: Option<&RECT>
) -> HrResult<()>
fn Render( &self, hdc: &HDC, dest_pt: POINT, dest_sz: SIZE, src_offset: Option<POINT>, src_extent: SIZE, metafile_bounds: Option<&RECT> ) -> HrResult<()>
IPicture::Render
method.source§fn SelectPicture(&self, hdc: &HDC) -> HrResult<(HDC, HBITMAP)>
fn SelectPicture(&self, hdc: &HDC) -> HrResult<(HDC, HBITMAP)>
IPicture::SelectPicture
method.source§impl ole_IUnknown for IPicture
impl ole_IUnknown for IPicture
source§unsafe fn from_ptr(p: *mut c_void) -> Self
unsafe fn from_ptr(p: *mut c_void) -> Self
Creates an object from a COM virtual table pointer. Read more
source§unsafe fn as_mut(&mut self) -> &mut *mut c_void
unsafe fn as_mut(&mut self) -> &mut *mut c_void
Returns a mutable reference do the underlying COM virtual table pointer. Read more
source§fn ptr(&self) -> *mut c_void
fn ptr(&self) -> *mut c_void
Returns the pointer to the underlying COM virtual table. Read more
source§fn QueryInterface<T>(&self) -> HrResult<T>where
T: ole_IUnknown,
fn QueryInterface<T>(&self) -> HrResult<T>where
T: ole_IUnknown,
IUnknown::QueryInterface
method.impl Send for IPicture
Auto Trait Implementations§
impl Freeze for IPicture
impl RefUnwindSafe for IPicture
impl !Sync for IPicture
impl Unpin for IPicture
impl UnwindSafe for IPicture
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