]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dc.h
Add "inherit" to <font> XRC tag.
[wxWidgets.git] / interface / wx / dc.h
index e1f100f64ca33be79545106f88d05502d42553cc..d496f73703e48f3e5c217c5fb44f3e95d914618b 100644 (file)
@@ -1534,6 +1534,45 @@ public:
 
     //@}
 
+    
+    /**
+        @name query capabilities
+    */
+    //@{
+
+    /**
+       Does the DC support drawing bitmaps?
+    */
+    bool CanDrawBitmap() const;
+
+    /**
+       Does the DC supoprt calculating the size required to draw text?
+    */
+    bool CanGetTextExtent() const;
+    
+    //@}
+
+    /**
+       Returns a value that can be used as a handle to the native drawing
+       context, if this wxDC has something that could be thought of in that
+       way.  (Not all of them do.)
+
+       For example, on Windows the return value is an HDC, on OSX it is a
+       CGContextRef and on wxGTK it will be a GdkDrawable.  If the DC is a
+       wxGCDC then the return value will be the value returned from
+       wxGraphicsContext::GetNativeContext.  A value of NULL is returned if
+       the DC does not have anything that fits the handle concept.
+       
+       @since 2.9.5
+     */
+    void* GetHandle() const;
+
+    
+    /**
+       If supported by the platform and the type of DC, fetch the contents of the DC, or a subset of it, as a bitmap.
+    */
+    wxBitmap GetAsBitmap(const wxRect *subrect = NULL) const;
+
 
     void SetLogicalScale(double x, double y);
     void GetLogicalScale(double *x, double *y) const;
@@ -1548,10 +1587,12 @@ public:
 /**
     @class wxDCClipper
 
-    wxDCClipper is a small helper class for setting a clipping region on a wxDC
-    and unsetting it automatically. An object of wxDCClipper class is typically
-    created on the stack so that it is automatically destroyed when the object
-    goes out of scope. A typical usage example:
+    wxDCClipper is a helper class for setting a clipping region on a wxDC
+    during its lifetime.
+
+    An object of wxDCClipper class is typically created on the stack so that it
+    is automatically destroyed when the object goes out of scope. A typical
+    usage example:
 
     @code
     void MyFunction(wxDC& dc)
@@ -1568,6 +1609,12 @@ public:
     }
     @endcode
 
+    @note Unlike other similar classes such as wxDCFontChanger, wxDCClipper
+        currently doesn't restore the previously active clipping region when it
+        is destroyed but simply resets clipping on the associated wxDC. This
+        may be changed in the future wxWidgets versions but has to be taken
+        into account explicitly in the current one.
+
     @library{wxcore}
     @category{gdi}