wxRuby Documentation Home

Wx::BitmapHandler

Overviewwxbitmapoverview

This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
It is used within Bitmap and is not normally seen by the application.

If you wish to extend the capabilities of Bitmap, derive a class from BitmapHandler
and add the handler using Bitmap#add_handler in your
application initialisation.

Derived from

Object

See also

Bitmap, Icon, Cursor

Methods

BitmapHandler.new

destructor()

Destroys the BitmapHandler object.

BitmapHandler#create

Boolean create(%(arg-type)Bitmap% bitmap, (arg-type) data, Integer type, Integer width, Integer height, Integer depth = -1)

Creates a bitmap from the given data, which can be of arbitrary type. The Bitmap object bitmap is
manipulated by this function.

Parameters

Return value

true if the call succeeded, false otherwise (the default).

BitmapHandler#get_name

String get_name()

Gets the name of this handler.

BitmapHandler#get_extension

String get_extension()

Gets the file extension associated with this handler.

BitmapHandler#get_type

Integer get_type()

Gets the bitmap type associated with this handler.

BitmapHandler#load_file

Boolean load_file(%(arg-type)Bitmap% bitmap, String name, Integer type)

Loads a bitmap from a file or resource, putting the resulting data into bitmap.

Parameters

Return value

true if the operation succeeded, false otherwise.

See also

Bitmap#load_file

Bitmap#save_file

BitmapHandler#save_file

BitmapHandler#save_file

Boolean save_file(%(arg-type)Bitmap% bitmap, String name, Integer type, Palette palette = nil)

Saves a bitmap in the named file.

Parameters

Return value

true if the operation succeeded, false otherwise.

See also

Bitmap#load_file

Bitmap#save_file

BitmapHandler#load_file

BitmapHandler#set_name

set_name(%(arg-type)String% name)

Sets the handler name.

Parameters

BitmapHandler#set_extension

set_extension(%(arg-type)String% extension)

Sets the handler extension.

Parameters

BitmapHandler#set_type

set_type(%(arg-type)Integer% type)

Sets the handler type.

Parameters

[This page automatically generated from the Textile source at 2023-06-13 21:31:31 +0000]