- Creates bitmap object from the image. This has to be done
- to actually display an image as you cannot draw an image directly on a window.
- The resulting bitmap will use the provided colour depth (or that of the
- current system if depth is -1) which entails that a colour reduction has
- to take place.
- When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube
- created
- on program start-up to look up colors. This ensures a very fast conversion, but
- the image quality won't be perfect (and could be better for photo images using
- more
- sophisticated dithering algorithms).
- On Windows, if there is a palette present (set with SetPalette), it will be
- used when
- creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
- the palette is currently ignored.
-
+ Default constructor.
+
+ Constructs a bitmap object with no data; an assignment or another member
+ function such as Create() or LoadFile() must be called subsequently.
+ */
+ wxBitmap();
+
+ /**
+ Copy constructor, uses @ref overview_refcount "reference counting".
+ To make a real copy, you can use:
+
+ @code
+ wxBitmap newBitmap = oldBitmap.GetSubBitmap(
+ wxRect(0, 0, oldBitmap.GetWidth(), oldBitmap.GetHeight()));
+ @endcode
+ */
+ wxBitmap(const wxBitmap& bitmap);
+
+
+ /*
+ Creates a bitmap from the given @a data which is interpreted in
+ platform-dependent manner.
+
+ @param data
+ Specifies the bitmap data in a platform-dependent format.
+ @param type
+ May be one of the ::wxBitmapType values and indicates which type of
+ bitmap does @a data contains. See the note in the class
+ detailed description.
+ @param width
+ Specifies the width of the bitmap.
+ @param height
+ Specifies the height of the bitmap.
+ @param depth
+ Specifies the depth of the bitmap.
+ If this is omitted, the display depth of the screen is used.
+ wxBitmap(const void* data, int type, int width, int height, int depth = -1);
+
+
+ NOTE: this ctor is not implemented by all port, is somewhat useless
+ without further description of the "data" supported formats and
+ uses 'int type' instead of wxBitmapType, so don't document it.
+ */
+
+ /**
+ Creates a bitmap from the given array @a bits.
+ You should only use this function for monochrome bitmaps (depth 1) in
+ portable programs: in this case the bits parameter should contain an XBM image.
+
+ For other bit depths, the behaviour is platform dependent: under Windows,
+ the data is passed without any changes to the underlying CreateBitmap() API.
+ Under other platforms, only monochrome bitmaps may be created using this
+ constructor and wxImage should be used for creating colour bitmaps from
+ static data.
+