Mention that raw pixel access is efficient only with DIBs under MSW.
While accessing DDBs (now) works too, it's inefficient and should be avoided. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
11d0e0f943
commit
03c0dc0235
@ -24,10 +24,16 @@
|
||||
@li wxImagePixelData: Class to access to wxImage's internal data with
|
||||
alpha channel (RGBA).
|
||||
|
||||
wxMSW note: efficient access is only possible to the bits of the so called
|
||||
device independent bitmaps (DIB) under MSW. To ensure that wxBitmap uses a
|
||||
DIB internally and not a device dependent bitmap (DDB), you need to pass an
|
||||
explicit depth to its ctor, i.e. either 24 or 32, as by default wxBitmap
|
||||
creates a DDB of the screen depth.
|
||||
|
||||
Example:
|
||||
|
||||
@code
|
||||
wxBitmap bmp;
|
||||
wxBitmap bmp(width, size, 24); // explicit depth important under MSW
|
||||
wxNativePixelData data(bmp);
|
||||
if ( !data )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user