]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 23 Aug 2011 04:55:46 +0000 (04:55 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 23 Aug 2011 04:55:46 +0000 (04:55 +0000)
Having wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE is more consistent with already using the complete short name of an image format elsewhere (e.g. wxBITMAP_TYPE_JPEG, not wxBTMAP_TYPE_JPG, and wxTIFFHandler as opposed to wxTIFHandler). Renamed all existing occurrences and kept the old enum values for backwards compatibility.

Also renamed occurrences of wxBITMAP_TYPE_RESOURCE to the already existing wxBITMAP_TYPE_BMP_RESOURCE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/doxygen/overviews/bitmap.h
include/wx/bitmap.h
include/wx/gdicmn.h
interface/wx/gdicmn.h
interface/wx/image.h
samples/image/canvas.cpp
src/common/cshelp.cpp
src/common/imagtiff.cpp
src/richtext/richtexthtml.cpp
tests/image/image.cpp
utils/emulator/src/emulator.cpp

index 680facc5a23de5b15834ea77594bfff0c9726592..2a375ca777cc32fffa97658f4b74a0ac0817c734 100644 (file)
@@ -70,7 +70,7 @@ wxBitmap bmp(wxBITMAP(bmpname));
 
 // which is roughly equivalent to the following
 #if defined(__WXMSW__) || defined(__WXPM__)
-    wxBitmap bmp("bmpname", wxBITMAP_TYPE_RESOURCE);
+    wxBitmap bmp("bmpname", wxBITMAP_TYPE_BMP_RESOURCE);
 #else // Unix
     wxBitmap bmp(bmpname_xpm, wxBITMAP_TYPE_XPM);
 #endif
index 754eabc63199384a9174c4c8db99aff641d8f012..2ba1122fc217a37c9402ceccb1f786b4b372a216 100644 (file)
@@ -256,10 +256,10 @@ protected:
     #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_XPM
     #include "wx/x11/bitmap.h"
 #elif defined(__WXMGL__)
-    #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_RESOURCE
+    #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_BMP_RESOURCE
     #include "wx/mgl/bitmap.h"
 #elif defined(__WXDFB__)
-    #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_RESOURCE
+    #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_BMP_RESOURCE
     #include "wx/dfb/bitmap.h"
 #elif defined(__WXMAC__)
     #define wxBITMAP_DEFAULT_TYPE    wxBITMAP_TYPE_PICT_RESOURCE
index 5b6282d4b2a6abb33e04a60249d4b88bdc645d7c..bf7fa6079226a041682267c84520fe3c78427cc6 100644 (file)
@@ -59,8 +59,10 @@ enum wxBitmapType
     wxBITMAP_TYPE_XBM_DATA,
     wxBITMAP_TYPE_XPM,
     wxBITMAP_TYPE_XPM_DATA,
-    wxBITMAP_TYPE_TIF,
-    wxBITMAP_TYPE_TIF_RESOURCE,
+    wxBITMAP_TYPE_TIFF,
+    wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF,
+    wxBITMAP_TYPE_TIFF_RESOURCE,
+    wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE,
     wxBITMAP_TYPE_GIF,
     wxBITMAP_TYPE_GIF_RESOURCE,
     wxBITMAP_TYPE_PNG,
@@ -202,7 +204,7 @@ enum wxStockCursor
  */
 
 #if defined(__WXMSW__) || defined(__WXPM__)
-    #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
+    #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_BMP_RESOURCE)
 #elif defined(__WXGTK__)   || \
       defined(__WXMOTIF__) || \
       defined(__WXX11__)   || \
index b66042137412a56958e7291eb5d47d5313dd611c..c26755c304709e3a35182b7cc656d576d604e5d2 100644 (file)
@@ -24,8 +24,10 @@ enum wxBitmapType
     wxBITMAP_TYPE_XBM_DATA,
     wxBITMAP_TYPE_XPM,
     wxBITMAP_TYPE_XPM_DATA,
-    wxBITMAP_TYPE_TIF,
-    wxBITMAP_TYPE_TIF_RESOURCE,
+    wxBITMAP_TYPE_TIFF,
+    wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF,
+    wxBITMAP_TYPE_TIFF_RESOURCE,
+    wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE,
     wxBITMAP_TYPE_GIF,
     wxBITMAP_TYPE_GIF_RESOURCE,
     wxBITMAP_TYPE_PNG,
index 7c5dcd6b2f050a928c161348a00f86d807453974..88175ba4fc4bc7d3ea25e5dfe9941a38a86a8b4b 100644 (file)
@@ -522,7 +522,7 @@ public:
             @li wxBITMAP_TYPE_PNG: Load a PNG bitmap file.
             @li wxBITMAP_TYPE_PCX: Load a PCX bitmap file.
             @li wxBITMAP_TYPE_PNM: Load a PNM bitmap file.
-            @li wxBITMAP_TYPE_TIF: Load a TIFF bitmap file.
+            @li wxBITMAP_TYPE_TIFF: Load a TIFF bitmap file.
             @li wxBITMAP_TYPE_TGA: Load a TGA bitmap file.
             @li wxBITMAP_TYPE_XPM: Load a XPM bitmap file.
             @li wxBITMAP_TYPE_ICO: Load a Windows icon file (ICO).
@@ -1299,7 +1299,7 @@ public:
             @li wxBITMAP_TYPE_PNG: Load a PNG bitmap file.
             @li wxBITMAP_TYPE_PCX: Load a PCX bitmap file.
             @li wxBITMAP_TYPE_PNM: Load a PNM bitmap file.
-            @li wxBITMAP_TYPE_TIF: Load a TIFF bitmap file.
+            @li wxBITMAP_TYPE_TIFF: Load a TIFF bitmap file.
             @li wxBITMAP_TYPE_TGA: Load a TGA bitmap file.
             @li wxBITMAP_TYPE_XPM: Load a XPM bitmap file.
             @li wxBITMAP_TYPE_ICO: Load a Windows icon file (ICO).
@@ -1781,7 +1781,7 @@ public:
         @li wxBITMAP_TYPE_PNG: Load a PNG bitmap file.
         @li wxBITMAP_TYPE_PCX: Load a PCX bitmap file.
         @li wxBITMAP_TYPE_PNM: Load a PNM bitmap file.
-        @li wxBITMAP_TYPE_TIF: Load a TIFF bitmap file.
+        @li wxBITMAP_TYPE_TIFF: Load a TIFF bitmap file.
         @li wxBITMAP_TYPE_TGA: Load a TGA bitmap file.
         @li wxBITMAP_TYPE_XPM: Load a XPM bitmap file.
         @li wxBITMAP_TYPE_ICO: Load a Windows icon file (ICO).
index 3bff81316f6bde4f041e9559fb23f4e94650246c..2fc194423caf011e65f715f2a0b8f18c75a53fb7 100644 (file)
@@ -243,7 +243,7 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
 #if wxUSE_LIBTIFF
     image.Destroy();
 
-    if ( !image.LoadFile( dir + wxT("horse.tif"), wxBITMAP_TYPE_TIF ) )
+    if ( !image.LoadFile( dir + wxT("horse.tif"), wxBITMAP_TYPE_TIFF ) )
     {
         wxLogError(wxT("Can't load TIFF image"));
     }
index 5bbdd65f524842f20d1956823d5deb5e569d7ca1..f0f72c147bcd15f8e6219d883da4d0cad787df3d 100644 (file)
@@ -284,7 +284,7 @@ wxContextHelpButton::wxContextHelpButton(wxWindow* parent,
                                          long style)
 #if defined(__WXPM__)
                    : wxBitmapButton(parent, id, wxBitmap(wxCSQUERY_BITMAP
-                                                         ,wxBITMAP_TYPE_RESOURCE
+                                                         ,wxBITMAP_TYPE_BMP_RESOURCE
                                                         ),
                                     pos, size, style)
 #else
index 40083e6bab00be826a905c07d2b064d10accf454..c71497af3b4c27d040311da80a135ec2c75036f4 100644 (file)
@@ -110,7 +110,7 @@ wxTIFFHandler::wxTIFFHandler()
     m_name = wxT("TIFF file");
     m_extension = wxT("tif");
     m_altExtensions.Add(wxT("tiff"));
-    m_type = wxBITMAP_TYPE_TIF;
+    m_type = wxBITMAP_TYPE_TIFF;
     m_mime = wxT("image/tiff");
     TIFFSetWarningHandler((TIFFErrorHandler) TIFFwxWarningHandler);
     TIFFSetErrorHandler((TIFFErrorHandler) TIFFwxErrorHandler);
index 06670cb4868264281c9169b16d3c5e7aca79b09e..f9a24d9c9fcfe42f61c309199bd92cf2ef10630b 100644 (file)
@@ -588,7 +588,7 @@ const wxChar* wxRichTextHTMLHandler::GetMimeType(int imageType)
     {
     case wxBITMAP_TYPE_BMP:
         return wxT("image/bmp");
-    case wxBITMAP_TYPE_TIF:
+    case wxBITMAP_TYPE_TIFF:
         return wxT("image/tiff");
     case wxBITMAP_TYPE_GIF:
         return wxT("image/gif");
index 0350dcbfa9bd94a100473c276501898c8b4d1b38..d063621dcc1527b8922c96fbfe3e269c0f7ce317 100644 (file)
@@ -50,7 +50,7 @@ struct testData {
     { "horse.pcx", wxBITMAP_TYPE_PCX, 8 },
     { "horse.pnm", wxBITMAP_TYPE_PNM, 24 },
     { "horse.tga", wxBITMAP_TYPE_TGA, 8 },
-    { "horse.tif", wxBITMAP_TYPE_TIF, 8 }
+    { "horse.tif", wxBITMAP_TYPE_TIFF, 8 }
 };
 
 
@@ -192,7 +192,7 @@ void ImageTestCase::LoadFromZipStream()
             case wxBITMAP_TYPE_GIF:
             case wxBITMAP_TYPE_PCX:
             case wxBITMAP_TYPE_TGA:
-            case wxBITMAP_TYPE_TIF:
+            case wxBITMAP_TYPE_TIFF:
             continue;       // skip testing those wxImageHandlers which cannot
                             // load data from non-seekable streams
 
@@ -1097,7 +1097,7 @@ static void TestTIFFImage(const wxString& option, int value)
     wxMemoryOutputStream memOut;
     image.SetOption(option, value);
 
-    CPPUNIT_ASSERT(image.SaveFile(memOut, wxBITMAP_TYPE_TIF));
+    CPPUNIT_ASSERT(image.SaveFile(memOut, wxBITMAP_TYPE_TIFF));
 
     wxMemoryInputStream memIn(memOut);
     CPPUNIT_ASSERT(memIn.IsOk());
index e7f1545b17c073999fca3e572a627d6a971c2f91..f033ac1774567b88161cefa8ff87aba0a40bb70e 100644 (file)
@@ -534,7 +534,7 @@ wxBitmapType wxDetermineImageType(const wxString& filename)
     if (ext == wxT("pcx"))
         return wxBITMAP_TYPE_PCX;
     if (ext == wxT("tif") || ext == wxT("tiff"))
-        return wxBITMAP_TYPE_TIF;
+        return wxBITMAP_TYPE_TIFF;
 
     return wxBITMAP_TYPE_INVALID;
 }