Added Robin Dunn's explanation on the relationship of wxBitmap and wxImage into interface doxygen section

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
John Chain
2011-07-09 18:40:11 +00:00
parent 930d20e710
commit fcd9ed6c37
2 changed files with 22 additions and 0 deletions

View File

@@ -183,6 +183,17 @@ public:
Note that all available wxBitmapHandlers for a given wxWidgets port are
automatically loaded at startup so you won't need to use wxBitmap::AddHandler.
More on the difference between wxImage and wxBitmap: wxImage is just a
buffer of RGB bytes with an optional buffer for the alpha bytes. It is all
generic, platform independent and image file format independent code. It
includes generic code for scaling, resizing, clipping, and other manipulations
of the image data. OTOH, wxBitmap is intended to be a wrapper of whatever is
the native image format that is quickest/easiest to draw to a DC or to be the
target of the drawing operations performed on a wxMemoryDC. By splitting the
responsibilities between wxImage/wxBitmap like this then it's easier to use
generic code shared by all platforms and image types for generic operations and
platform specific code where performance or compatibility is needed.
@library{wxcore}
@category{gdi}

View File

@@ -314,6 +314,17 @@ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff;
the wxBitmap::wxBitmap(wxImage,int depth) constructor.
This bitmap can then be drawn in a device context, using wxDC::DrawBitmap.
More on the difference between wxImage and wxBitmap: wxImage is just a
buffer of RGB bytes with an optional buffer for the alpha bytes. It is all
generic, platform independent and image file format independent code. It
includes generic code for scaling, resizing, clipping, and other manipulations
of the image data. OTOH, wxBitmap is intended to be a wrapper of whatever is
the native image format that is quickest/easiest to draw to a DC or to be the
target of the drawing operations performed on a wxMemoryDC. By splitting the
responsibilities between wxImage/wxBitmap like this then it's easier to use
generic code shared by all platforms and image types for generic operations and
platform specific code where performance or compatibility is needed.
One colour value of the image may be used as a mask colour which will lead to
the automatic creation of a wxMask object associated to the bitmap object.