]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/image.h
fix to make 'wxAtomicInt i = 0;' work with generic implementation and gcc
[wxWidgets.git] / include / wx / image.h
index b1d7eea62a89a3c29a038b8d14f68bac365806cc..95fe4dfd3e314a06f3aa717e14868f20d016892a 100644 (file)
 #define wxIMAGE_OPTION_RESOLUTIONUNIT        wxString(_T("ResolutionUnit"))
 
 // constants used with wxIMAGE_OPTION_RESOLUTIONUNIT
-enum
+//
+// NB: don't change these values, they correspond to libjpeg constants
+enum wxImageResolution
 {
+    // Resolution not specified
+    wxIMAGE_RESOLUTION_NONE = 0,
+
+    // Resolution specified in inches
     wxIMAGE_RESOLUTION_INCHES = 1,
+
+    // Resolution specified in centimeters
     wxIMAGE_RESOLUTION_CM = 2
 };
 
@@ -61,9 +69,9 @@ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff;
 // classes
 //-----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxImageHandler;
-class WXDLLEXPORT wxImage;
-class WXDLLEXPORT wxPalette;
+class WXDLLIMPEXP_FWD_CORE wxImageHandler;
+class WXDLLIMPEXP_FWD_CORE wxImage;
+class WXDLLIMPEXP_FWD_CORE wxPalette;
 
 //-----------------------------------------------------------------------------
 // wxVariant support
@@ -112,6 +120,13 @@ protected:
     bool CallDoCanRead(wxInputStream& stream);
 #endif // wxUSE_STREAMS
 
+    // helper for the derived classes SaveFile() implementations: returns the
+    // values of x- and y-resolution options specified as the image options if
+    // any
+    static wxImageResolution
+    GetResolutionFromOptions(const wxImage& image, int *x, int *y);
+
+
     wxString  m_name;
     wxString  m_extension;
     wxString  m_mime;
@@ -423,7 +438,7 @@ protected:
     virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
 
 private:
-    friend class WXDLLEXPORT wxImageHandler;
+    friend class WXDLLIMPEXP_FWD_CORE wxImageHandler;
 
     DECLARE_DYNAMIC_CLASS(wxImage)
 };