wxdcclipperwxdcclipper 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:
void myfunction(wxdc& dc) { wxdcclipper clip(rect); ... drawing functions here are affected by clipping rect ... } void otherfunction() { wxdc dc; myfunction(dc); ... drawing functions here are not affected by clipping rect ... }derived from no base class include files <wx/dc.h> see also
members
wxdcclipper::wxdcclipperwxdcclipper(wxdc& dc, const wxregion& r) wxdcclipper(wxdc& dc, const wxrect& rect) wxdcclipper(wxdc& dc, int x, int y, int w, int h) sets the clipping region to the specified region r or rectangle specified by either a single rect parameter or its position (x and y) and size (w ad h). the clipping region is automatically unset when this object is destroyed.
|