Added wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE.
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
This commit is contained in:
parent
ca21c76b2a
commit
4ca8531f61
@ -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
|
||||
|
@ -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
|
||||
|
@ -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__) || \
|
||||
|
@ -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,
|
||||
|
@ -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).
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user