]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_image.i
use CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT as this gives more detailed inform...
[wxWidgets.git] / wxPython / src / _image.i
index 0c28784711d40ee6c8edf44bf19557c4ea0bedb0..3f568e5cb6cfa8931ff618411d13afb611389261 100644 (file)
@@ -27,7 +27,6 @@ enum {
     wxIMAGE_ALPHA_OPAQUE
 };
 
     wxIMAGE_ALPHA_OPAQUE
 };
 
-
 // Constants for wxImage::Scale() for determining the level of quality
 enum
 {
 // Constants for wxImage::Scale() for determining the level of quality
 enum
 {
@@ -232,6 +231,7 @@ public:
 };
 
 
 };
 
 
+
 class wxImage : public wxObject {
 public:
     %typemap(out) wxImage*;    // turn off this typemap
 class wxImage : public wxObject {
 public:
     %typemap(out) wxImage*;    // turn off this typemap
@@ -668,8 +668,9 @@ object, using a MIME type string to specify the image file format.", "",
     
 
     DocDeclStr(
     
 
     DocDeclStr(
-        bool , Ok(),
+        bool , IsOk(),
         "Returns true if image data is present.", "");
         "Returns true if image data is present.", "");
+    %pythoncode { Ok = IsOk }
     
     DocDeclStr(
         int , GetWidth(),
     
     DocDeclStr(
         int , GetWidth(),
@@ -1035,7 +1036,7 @@ range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees", "");
         "Converts a color in HSV color space to RGB color space.", "");
     
 
         "Converts a color in HSV color space to RGB color space.", "");
     
 
-    %pythoncode { def __nonzero__(self): return self.Ok() }
+    %pythoncode { def __nonzero__(self): return self.IsOk() }
     
     %property(AlphaBuffer, GetAlphaBuffer, SetAlphaBuffer, doc="See `GetAlphaBuffer` and `SetAlphaBuffer`");
     %property(AlphaData, GetAlphaData, SetAlphaData, doc="See `GetAlphaData` and `SetAlphaData`");
     
     %property(AlphaBuffer, GetAlphaBuffer, SetAlphaBuffer, doc="See `GetAlphaBuffer` and `SetAlphaBuffer`");
     %property(AlphaData, GetAlphaData, SetAlphaData, doc="See `GetAlphaData` and `SetAlphaData`");
@@ -1045,8 +1046,8 @@ range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees", "");
     %property(MaskBlue, GetMaskBlue, doc="See `GetMaskBlue`");
     %property(MaskGreen, GetMaskGreen, doc="See `GetMaskGreen`");
     %property(MaskRed, GetMaskRed, doc="See `GetMaskRed`");
     %property(MaskBlue, GetMaskBlue, doc="See `GetMaskBlue`");
     %property(MaskGreen, GetMaskGreen, doc="See `GetMaskGreen`");
     %property(MaskRed, GetMaskRed, doc="See `GetMaskRed`");
-    %property(Size, GetSize, doc="See `GetSize`");
     %property(Width, GetWidth, doc="See `GetWidth`");
     %property(Width, GetWidth, doc="See `GetWidth`");
+    
 };
 
 
 };
 
 
@@ -1139,13 +1140,21 @@ MAKE_CONST_WXSTRING(IMAGE_OPTION_RESOLUTIONY);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_RESOLUTIONUNIT);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_QUALITY);
 
 MAKE_CONST_WXSTRING(IMAGE_OPTION_RESOLUTIONUNIT);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_QUALITY);
 
-enum
+// constants used with wxIMAGE_OPTION_RESOLUTIONUNIT
+enum wxImageResolution
 {
 {
+    // Resolution not specified
+    wxIMAGE_RESOLUTION_NONE = 0,
+
+    // Resolution specified in inches
     wxIMAGE_RESOLUTION_INCHES = 1,
     wxIMAGE_RESOLUTION_INCHES = 1,
+
+    // Resolution specified in centimeters
     wxIMAGE_RESOLUTION_CM = 2
 };
 
 
     wxIMAGE_RESOLUTION_CM = 2
 };
 
 
+
 MAKE_CONST_WXSTRING(IMAGE_OPTION_BITSPERSAMPLE);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_SAMPLESPERPIXEL); 
 MAKE_CONST_WXSTRING(IMAGE_OPTION_COMPRESSION);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_BITSPERSAMPLE);
 MAKE_CONST_WXSTRING(IMAGE_OPTION_SAMPLESPERPIXEL); 
 MAKE_CONST_WXSTRING(IMAGE_OPTION_COMPRESSION);
@@ -1261,7 +1270,12 @@ public:
 };
 
 
 };
 
 
-#if wxUSE_IFF
+
+#if 0
+%{
+#include <wx/imagiff.h>
+%}
+
 DocStr(wxIFFHandler,
 "A `wx.ImageHandler` for IFF image files.", "");
 class wxIFFHandler : public wxImageHandler {
 DocStr(wxIFFHandler,
 "A `wx.ImageHandler` for IFF image files.", "");
 class wxIFFHandler : public wxImageHandler {
@@ -1270,6 +1284,19 @@ public:
 };
 #endif
 
 };
 #endif
 
+
+%{
+#include <wx/imagtga.h>
+%}
+
+DocStr(wxTGAHandler,
+"A `wx.ImageHandler` for TGA image files.", "");
+class wxTGAHandler : public wxImageHandler {
+public:
+    wxTGAHandler();
+};
+
+
 //---------------------------------------------------------------------------
 
 %{
 //---------------------------------------------------------------------------
 
 %{