pub trait BitmapMethods: GDIObjectMethods {
Show 36 methods
// Provided methods
fn convert_to_image(&self) -> Image { ... }
fn copy_from_icon<I: IconMethods>(&self, icon: &I) -> bool { ... }
fn create_int_int(&self, width: c_int, height: c_int, depth: c_int) -> bool { ... }
fn create_size<S: SizeMethods>(&self, sz: &S, depth: c_int) -> bool { ... }
fn create_int_dc<D: DCMethods>(
&self,
width: c_int,
height: c_int,
dc: &D,
) -> bool { ... }
fn create_with_dip_size_size<S: SizeMethods>(
&self,
size: &S,
scale: c_double,
depth: c_int,
) -> bool { ... }
fn create_with_dip_size_int(
&self,
width: c_int,
height: c_int,
scale: c_double,
depth: c_int,
) -> bool { ... }
fn create_scaled(
&self,
width: c_int,
height: c_int,
depth: c_int,
logical_scale: c_double,
) -> bool { ... }
fn get_depth(&self) -> c_int { ... }
fn get_dip_size(&self) -> Size { ... }
fn get_height(&self) -> c_int { ... }
fn get_logical_height(&self) -> c_double { ... }
fn get_logical_size(&self) -> Size { ... }
fn get_logical_width(&self) -> c_double { ... }
fn get_mask(&self) -> Option<MaskIsOwned<false>> { ... }
fn get_palette(&self) -> Option<PaletteIsOwned<false>> { ... }
fn get_sub_bitmap<R: RectMethods>(&self, rect: &R) -> Bitmap { ... }
fn get_scale_factor(&self) -> c_double { ... }
fn get_scaled_height(&self) -> c_double { ... }
fn get_scaled_size(&self) -> Size { ... }
fn get_scaled_width(&self) -> c_double { ... }
fn get_size(&self) -> Size { ... }
fn get_width(&self) -> c_int { ... }
fn has_alpha(&self) -> bool { ... }
fn is_ok(&self) -> bool { ... }
fn set_scale_factor(&self, scale: c_double) { ... }
fn set_mask<M: MaskMethods>(&self, mask: Option<&M>) { ... }
fn set_palette<P: PaletteMethods>(&self, palette: &P) { ... }
fn add_handler<B: BitmapHandlerMethods>(handler: Option<&B>) { ... }
fn clean_up_handlers() { ... }
fn find_handler(name: &str) -> Option<BitmapHandlerIsOwned<false>> { ... }
fn init_standard_handlers() { ... }
fn insert_handler<B: BitmapHandlerMethods>(handler: Option<&B>) { ... }
fn new_from_png_data(data: *const c_void, size: usize) -> Bitmap { ... }
fn remove_handler(name: &str) -> bool { ... }
fn rescale<B: BitmapMethods, S: SizeMethods>(bmp: &B, size_needed: &S) { ... }
}Expand description
This trait represents C++ wxBitmap class’s methods and inheritance.
See BitmapIsOwned documentation for the class usage.
Provided Methods§
Sourcefn convert_to_image(&self) -> Image
fn convert_to_image(&self) -> Image
Creates an image from a platform-dependent bitmap.
Sourcefn copy_from_icon<I: IconMethods>(&self, icon: &I) -> bool
fn copy_from_icon<I: IconMethods>(&self, icon: &I) -> bool
Creates the bitmap from an icon.
Sourcefn create_int_int(&self, width: c_int, height: c_int, depth: c_int) -> bool
fn create_int_int(&self, width: c_int, height: c_int, depth: c_int) -> bool
Creates a fresh bitmap.
Sourcefn create_size<S: SizeMethods>(&self, sz: &S, depth: c_int) -> bool
fn create_size<S: SizeMethods>(&self, sz: &S, depth: c_int) -> bool
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sourcefn create_int_dc<D: DCMethods>(
&self,
width: c_int,
height: c_int,
dc: &D,
) -> bool
fn create_int_dc<D: DCMethods>( &self, width: c_int, height: c_int, dc: &D, ) -> bool
Create a bitmap compatible with the given DC, inheriting its magnification factor.
Sourcefn create_with_dip_size_size<S: SizeMethods>(
&self,
size: &S,
scale: c_double,
depth: c_int,
) -> bool
fn create_with_dip_size_size<S: SizeMethods>( &self, size: &S, scale: c_double, depth: c_int, ) -> bool
Create a bitmap specifying its size in DPI-independent pixels and the scale factor to use.
Sourcefn create_with_dip_size_int(
&self,
width: c_int,
height: c_int,
scale: c_double,
depth: c_int,
) -> bool
fn create_with_dip_size_int( &self, width: c_int, height: c_int, scale: c_double, depth: c_int, ) -> bool
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sourcefn create_scaled(
&self,
width: c_int,
height: c_int,
depth: c_int,
logical_scale: c_double,
) -> bool
fn create_scaled( &self, width: c_int, height: c_int, depth: c_int, logical_scale: c_double, ) -> bool
Create a bitmap with a scale factor.
Sourcefn get_dip_size(&self) -> Size
fn get_dip_size(&self) -> Size
Returns the size of bitmap in DPI-independent units.
Sourcefn get_height(&self) -> c_int
fn get_height(&self) -> c_int
Returns the height of the bitmap in physical pixels.
Sourcefn get_logical_height(&self) -> c_double
fn get_logical_height(&self) -> c_double
Returns the height of the bitmap in logical pixels.
Sourcefn get_logical_size(&self) -> Size
fn get_logical_size(&self) -> Size
Returns the size of the bitmap in logical pixels.
Sourcefn get_logical_width(&self) -> c_double
fn get_logical_width(&self) -> c_double
Returns the width of the bitmap in logical pixels.
Sourcefn get_mask(&self) -> Option<MaskIsOwned<false>>
fn get_mask(&self) -> Option<MaskIsOwned<false>>
Gets the associated mask (if any) which may have been loaded from a file or set for the bitmap.
Sourcefn get_palette(&self) -> Option<PaletteIsOwned<false>>
fn get_palette(&self) -> Option<PaletteIsOwned<false>>
Gets the associated palette (if any) which may have been loaded from a file or set for the bitmap.
Sourcefn get_sub_bitmap<R: RectMethods>(&self, rect: &R) -> Bitmap
fn get_sub_bitmap<R: RectMethods>(&self, rect: &R) -> Bitmap
Returns a sub bitmap of the current one as long as the rect belongs entirely to the bitmap.
Sourcefn get_scale_factor(&self) -> c_double
fn get_scale_factor(&self) -> c_double
Returns the scale factor of this bitmap.
Sourcefn get_scaled_height(&self) -> c_double
fn get_scaled_height(&self) -> c_double
Returns the height of the bitmap in logical pixels.
Sourcefn get_scaled_size(&self) -> Size
fn get_scaled_size(&self) -> Size
Returns the size of the bitmap in logical pixels.
Sourcefn get_scaled_width(&self) -> c_double
fn get_scaled_width(&self) -> c_double
Returns the width of the bitmap in logical pixels.
Sourcefn set_scale_factor(&self, scale: c_double)
fn set_scale_factor(&self, scale: c_double)
Sets the bitmap scale factor.
Sourcefn set_mask<M: MaskMethods>(&self, mask: Option<&M>)
fn set_mask<M: MaskMethods>(&self, mask: Option<&M>)
Sets the mask for this bitmap.
Sourcefn set_palette<P: PaletteMethods>(&self, palette: &P)
fn set_palette<P: PaletteMethods>(&self, palette: &P)
Sets the associated palette.
Sourcefn add_handler<B: BitmapHandlerMethods>(handler: Option<&B>)
fn add_handler<B: BitmapHandlerMethods>(handler: Option<&B>)
Adds a handler to the end of the static list of format handlers.
Sourcefn clean_up_handlers()
fn clean_up_handlers()
Deletes all bitmap handlers.
Sourcefn find_handler(name: &str) -> Option<BitmapHandlerIsOwned<false>>
fn find_handler(name: &str) -> Option<BitmapHandlerIsOwned<false>>
Finds the handler with the given name.
Sourcefn init_standard_handlers()
fn init_standard_handlers()
Adds the standard bitmap format handlers, which, depending on wxWidgets configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
Sourcefn insert_handler<B: BitmapHandlerMethods>(handler: Option<&B>)
fn insert_handler<B: BitmapHandlerMethods>(handler: Option<&B>)
Adds a handler at the start of the static list of format handlers.
Sourcefn new_from_png_data(data: *const c_void, size: usize) -> Bitmap
fn new_from_png_data(data: *const c_void, size: usize) -> Bitmap
Loads a bitmap from the memory containing image data in PNG format.
Sourcefn remove_handler(name: &str) -> bool
fn remove_handler(name: &str) -> bool
Finds the handler with the given name, and removes it.
Sourcefn rescale<B: BitmapMethods, S: SizeMethods>(bmp: &B, size_needed: &S)
fn rescale<B: BitmapMethods, S: SizeMethods>(bmp: &B, size_needed: &S)
Rescale the given bitmap to the requested size.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".