// Name: dc.h
// Purpose: interface of wxDC
// Author: wxWidgets team
-// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxMM_TWIPS,
/**
- Each logical unit is a @e "printer point" i.e. 1/72 of an inch.
+ Each logical unit is a @e "printer point" i.e.\ 1/72 of an inch.
Equivalent to about 353 micrometers.
*/
wxMM_POINTS
Not supported by wxPerl.
@endWxPerlOnly
*/
- void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
+ void DrawLines(int n, const wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0);
/**
This method uses a list of wxPoints, adding the optional offset
Not supported by wxPerl.
@endWxPerlOnly
*/
- void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
+ void DrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0,
wxPolygonFillMode fill_style = wxODDEVEN_RULE);
/**
the DrawPolygon() member function, the polygons created by this
method are not closed automatically.
*/
- void DrawPolyPolygon(int n, int count[], wxPoint points[],
+ void DrawPolyPolygon(int n, const int count[], const wxPoint points[],
wxCoord xoffset = 0, wxCoord yoffset = 0,
wxPolygonFillMode fill_style = wxODDEVEN_RULE);
Not supported by wxPerl.
@endWxPerlOnly
*/
- void DrawSpline(int n, wxPoint points[]);
+ void DrawSpline(int n, const wxPoint points[]);
/**
@overload
- wxFLOOD_BORDER: The area to be flooded is bounded by the given
colour.
+ Currently this method is not implemented in wxOSX and does nothing
+ there.
+
@return @false if the operation failed.
@note The present implementation for non-Windows platforms may fail to
bool IsOk() const;
/**
- Sets the x and y axis orientation (i.e., the direction from lowest to
+ Sets the x and y axis orientation (i.e.\ the direction from lowest to
highest values on the axis). The default orientation is x axis from
left to right and y axis from top down.
void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
/**
- Sets the device origin (i.e., the origin in pixels after scaling has
+ Sets the device origin (i.e.\ the origin in pixels after scaling has
been applied). This function may be useful in Windows printing
operations for placing a graphic on a page.
*/
//@}
+
+ /**
+ @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
@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;