]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/image.h
Document wxEnhMetaFileDC-related wxGraphics functions.
[wxWidgets.git] / interface / wx / image.h
index 105ee05f0ff4dd0f7b328c23c07c2e666e550c17..cdeba80f58fad30146b38072fc26f30be053f98b 100644 (file)
@@ -39,10 +39,25 @@ enum wxImageResizeQuality
     /// Highest quality but slowest execution time.
     wxIMAGE_QUALITY_BICUBIC,
 
-    /// Default image resizing algorithm used by wxImage::Scale().
+    /**
+    Use surrounding pixels to calculate an average that will be used for
+    new pixels. This method is typically used when reducing the size of
+    an image.
+    */
+    wxIMAGE_QUALITY_BOX_AVERAGE,
+
+    /**
+    Default image resizing algorithm used by wxImage::Scale(). Currently
+    the same as wxIMAGE_QUALITY_NEAREST.
+    */
     wxIMAGE_QUALITY_NORMAL,
 
-    /// Best image resizing algorithm, currently same as wxIMAGE_QUALITY_BICUBIC.
+    /**
+    Best image resizing algorithm. Since version 2.9.2 this results in
+    wxIMAGE_QUALITY_BOX_AVERAGE being used when reducing the size of the
+    image (meaning that both the new width and height will be smaller than
+    the original size). Otherwise wxIMAGE_QUALITY_BICUBIC is used.
+    */
     wxIMAGE_QUALITY_HIGH
 };
 
@@ -299,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.
 
@@ -1077,7 +1103,7 @@ public:
 
         The function is case-insensitive to @a name.
         If the given option is not present, the function returns 0.
-        Use HasOption() is 0 is a possibly valid value for the option.
+        Use HasOption() if 0 is a possibly valid value for the option.
 
         Generic options:
         @li @c wxIMAGE_OPTION_MAX_WIDTH and @c wxIMAGE_OPTION_MAX_HEIGHT: If either
@@ -1786,7 +1812,7 @@ wxImage wxNullImage;
 /**
     Initializes all available image handlers.
 
-    This function call wxImage::AddHandler() for all the available image
+    This function calls wxImage::AddHandler() for all the available image
     handlers (see @ref image_handlers for the full list). Calling it is the
     simplest way to initialize wxImage but it creates and registers even the
     handlers your program may not use. If you want to avoid the overhead of