bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
//bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const;
%extend {
wxColour GetPixel(wxCoord x, wxCoord y) {
//bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const;
%extend {
wxColour GetPixel(wxCoord x, wxCoord y) {
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea);
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea);
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(DrawRectangleRect)void DrawRectangle(const wxRect& rect);
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(DrawRectangleRect)void DrawRectangle(const wxRect& rect);
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False);
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False);
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = False,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = False,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
+ %name(BlitPointSize) bool Blit(const wxPoint& destPt, const wxSize& sz,
+ wxDC *source, const wxPoint& srcPt,
+ int rop = wxCOPY, bool useMask = False,
+ const wxPoint& srcPtMask = wxDefaultPosition);
+ void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ %name(SetClippingRegionPointSize) void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
+ %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
+ %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
%name(FloodFillXY) bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE);
%name(FloodFillXY) bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE);
%name(DrawLineXY) void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
%name(DrawLineXY) void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
int rop = wxCOPY, bool useMask = False,
const wxPoint& srcPtMask = wxDefaultPosition);
int rop = wxCOPY, bool useMask = False,
const wxPoint& srcPtMask = wxDefaultPosition);
+
+ %name(SetClippingRegionXY)void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
+ %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
+ %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
+
#endif
void DrawLines(int points, wxPoint* points_array, wxCoord xoffset = 0, wxCoord yoffset = 0);
#endif
void DrawLines(int points, wxPoint* points_array, wxCoord xoffset = 0, wxCoord yoffset = 0);
wxCoord xoffset = 0, wxCoord yoffset = 0,
int fillStyle = wxODDEVEN_RULE);
wxCoord xoffset = 0, wxCoord yoffset = 0,
int fillStyle = wxODDEVEN_RULE);
- // TODO: Figure out what the start parameter means and devise a
- // good typemap for this
- //void DrawPolyPolygon(int n, int start[], wxPoint points[],
- // wxCoord xoffset = 0, wxCoord yoffset = 0,
- // int fillStyle = wxODDEVEN_RULE)
+ // TODO: Figure out a good typemap for this...
+ // Convert the first 3 args from a sequence of sequences?
+// void DrawPolyPolygon(int n, int count[], wxPoint points[],
+// wxCoord xoffset = 0, wxCoord yoffset = 0,
+// int fillStyle = wxODDEVEN_RULE);
// this version puts both optional bitmap and the text into the given
// rectangle and aligns is as specified by alignment parameter; it also
// will emphasize the character with the given index if it is != -1 and
// this version puts both optional bitmap and the text into the given
// rectangle and aligns is as specified by alignment parameter; it also
// will emphasize the character with the given index if it is != -1 and
- // clipping region
- // ---------------
-
- %name(SetClippingRegionXY)void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
- %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
- %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
-
wxPoint GetDeviceOrigin() const;
DocDeclAName(
void, GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
wxPoint GetDeviceOrigin() const;
DocDeclAName(
void, GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
-enum
-{
- // this is more efficient and hence default
- wxBUFFER_DC_OVERWRITE_BG = 0,
-
- // preserve the old background: more time consuming
- wxBUFFER_DC_PRESERVE_BG = 1,
// Construct a wxBufferedDC with an internal buffer of 'area'
// (where area is usually something like the size of the window
// being buffered)
// Construct a wxBufferedDC with an internal buffer of 'area'
// (where area is usually something like the size of the window
// being buffered)
- %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT );
+ %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area );
+
+
+ // The buffer is blit to the real DC when the BufferedDC is destroyed.
+ ~wxBufferedDC();
- %nokwargs wxBufferedPaintDC;
-
- wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer );
-
- // this ctor creates a bitmap of the size of the window for buffering
- wxBufferedPaintDC(wxWindow *window, int flags = wxBUFFER_DC_DEFAULT);
+ // If no bitmap is supplied by the user, a temporary one will be created.
+ wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap );