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 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);
-
"Get the width, height, decent and leading of the text using the current or specified font.\n"
"Works for single as well as multi-line strings.");
"Get the width, height, decent and leading of the text using the current or specified font.\n"
"Works for single as well as multi-line strings.");
wxPoint GetDeviceOrigin() const;
DocDeclAName(
void, GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
wxPoint GetDeviceOrigin() const;
DocDeclAName(
void, GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
// Construct a wxBufferedDC using a user supplied buffer.
wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
// Construct a wxBufferedDC using a user supplied buffer.
wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
- // 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)
+ wxBufferedDC( wxDC *dc, const wxSize &area );
+
+
+ // TODO: Keep this one too?
+ %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
+ "val._dc = args[0] # save a ref so the other dc will not be deleted before self";
- // Blits the buffer to the dc, and detaches the dc from
- // the buffer. Usually called in the dtor or by the dtor
- // of derived classes if the BufferedDC must blit before
- // the derived class (which may own the dc it's blitting
- // to) is destroyed.
+
+ // The buffer is blit to the real DC when the BufferedDC is destroyed.
+ ~wxBufferedDC();
+
+
+ // Blits the buffer to the dc, and detaches the dc from
+ // the buffer. Usually called in the dtor or by the dtor
+ // of derived classes if the BufferedDC must blit before
+ // the derived class (which may own the dc it's blitting
+ // to) is destroyed.