Trait BitmapMethods

Source
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§

Source

fn convert_to_image(&self) -> Image

Creates an image from a platform-dependent bitmap.

See C++ wxBitmap::ConvertToImage()’s documentation.

Source

fn copy_from_icon<I: IconMethods>(&self, icon: &I) -> bool

Creates the bitmap from an icon.

See C++ wxBitmap::CopyFromIcon()’s documentation.

Source

fn create_int_int(&self, width: c_int, height: c_int, depth: c_int) -> bool

Creates a fresh bitmap.

See C++ wxBitmap::Create()’s documentation.

Source

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.

See C++ wxBitmap::Create()’s documentation.

Source

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.

See C++ wxBitmap::Create()’s documentation.

Source

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.

See C++ wxBitmap::CreateWithDIPSize()’s documentation.

Source

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.

See C++ wxBitmap::CreateWithDIPSize()’s documentation.

Source

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.

See C++ wxBitmap::CreateScaled()’s documentation.

Source

fn get_depth(&self) -> c_int

Gets the colour depth of the bitmap.

See C++ wxBitmap::GetDepth()’s documentation.

Source

fn get_dip_size(&self) -> Size

Returns the size of bitmap in DPI-independent units.

See C++ wxBitmap::GetDIPSize()’s documentation.

Source

fn get_height(&self) -> c_int

Returns the height of the bitmap in physical pixels.

See C++ wxBitmap::GetHeight()’s documentation.

Source

fn get_logical_height(&self) -> c_double

Returns the height of the bitmap in logical pixels.

See C++ wxBitmap::GetLogicalHeight()’s documentation.

Source

fn get_logical_size(&self) -> Size

Returns the size of the bitmap in logical pixels.

See C++ wxBitmap::GetLogicalSize()’s documentation.

Source

fn get_logical_width(&self) -> c_double

Returns the width of the bitmap in logical pixels.

See C++ wxBitmap::GetLogicalWidth()’s documentation.

Source

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.

See C++ wxBitmap::GetMask()’s documentation.

Source

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.

See C++ wxBitmap::GetPalette()’s documentation.

Source

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.

See C++ wxBitmap::GetSubBitmap()’s documentation.

Source

fn get_scale_factor(&self) -> c_double

Returns the scale factor of this bitmap.

See C++ wxBitmap::GetScaleFactor()’s documentation.

Source

fn get_scaled_height(&self) -> c_double

Returns the height of the bitmap in logical pixels.

See C++ wxBitmap::GetScaledHeight()’s documentation.

Source

fn get_scaled_size(&self) -> Size

Returns the size of the bitmap in logical pixels.

See C++ wxBitmap::GetScaledSize()’s documentation.

Source

fn get_scaled_width(&self) -> c_double

Returns the width of the bitmap in logical pixels.

See C++ wxBitmap::GetScaledWidth()’s documentation.

Source

fn get_size(&self) -> Size

Returns the size of the bitmap in physical pixels.

See C++ wxBitmap::GetSize()’s documentation.

Source

fn get_width(&self) -> c_int

Returns the width of the bitmap in physical pixels.

See C++ wxBitmap::GetWidth()’s documentation.

Source

fn has_alpha(&self) -> bool

Returns true if the bitmap has an alpha channel.

See C++ wxBitmap::HasAlpha()’s documentation.

Source

fn is_ok(&self) -> bool

Returns true if bitmap data is present.

See C++ wxBitmap::IsOk()’s documentation.

Source

fn set_scale_factor(&self, scale: c_double)

Sets the bitmap scale factor.

See C++ wxBitmap::SetScaleFactor()’s documentation.

Source

fn set_mask<M: MaskMethods>(&self, mask: Option<&M>)

Sets the mask for this bitmap.

See C++ wxBitmap::SetMask()’s documentation.

Source

fn set_palette<P: PaletteMethods>(&self, palette: &P)

Sets the associated palette.

See C++ wxBitmap::SetPalette()’s documentation.

Source

fn add_handler<B: BitmapHandlerMethods>(handler: Option<&B>)

Adds a handler to the end of the static list of format handlers.

See C++ wxBitmap::AddHandler()’s documentation.

Source

fn clean_up_handlers()

Deletes all bitmap handlers.

See C++ wxBitmap::CleanUpHandlers()’s documentation.

Source

fn find_handler(name: &str) -> Option<BitmapHandlerIsOwned<false>>

Finds the handler with the given name.

See C++ wxBitmap::FindHandler()’s documentation.

Source

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.

See C++ wxBitmap::InitStandardHandlers()’s documentation.

Source

fn insert_handler<B: BitmapHandlerMethods>(handler: Option<&B>)

Adds a handler at the start of the static list of format handlers.

See C++ wxBitmap::InsertHandler()’s documentation.

Source

fn new_from_png_data(data: *const c_void, size: usize) -> Bitmap

Loads a bitmap from the memory containing image data in PNG format.

See C++ wxBitmap::NewFromPNGData()’s documentation.

Source

fn remove_handler(name: &str) -> bool

Finds the handler with the given name, and removes it.

See C++ wxBitmap::RemoveHandler()’s documentation.

Source

fn rescale<B: BitmapMethods, S: SizeMethods>(bmp: &B, size_needed: &S)

Rescale the given bitmap to the requested size.

See C++ wxBitmap::Rescale()’s documentation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const OWNED: bool> BitmapMethods for BitmapIsOwned<OWNED>