void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
- 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 DrawText(const wxString& text, wxCoord x, wxCoord y);
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,
+ int rop = wxCOPY, bool useMask = False,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
%name(DrawIconXY) void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
void DrawIcon(const wxIcon& icon, const wxPoint& pt);
- %name(DrawBitmapXY) void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = FALSE);
- void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = FALSE);
+ %name(DrawBitmapXY) void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False);
+ void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = False);
%name(DrawTextXY) void DrawText(const wxString& text, wxCoord x, wxCoord y);
void DrawText(const wxString& text, const wxPoint& pt);
%name(BlitXY) bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = FALSE,
+ int rop = wxCOPY, bool useMask = False,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
bool Blit(const wxPoint& destPt, const wxSize& sz,
wxDC *source, const wxPoint& srcPt,
- int rop = wxCOPY, bool useMask = FALSE,
+ int rop = wxCOPY, bool useMask = False,
const wxPoint& srcPtMask = wxDefaultPosition);
#endif
// clipping region
// ---------------
- void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- //void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
+ %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);
virtual void DestroyClippingRegion();
- void GetClippingBox(wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT) const;
+ DocDeclA(
+ void, GetClippingBox(wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT) const,
+ "GetClippingBox() -> (x, y, width, height)");
+
%extend {
wxRect GetClippingRect() {
wxRect rect;
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
- // only works for single line strings
- void GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT);
- %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
- wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT,
- wxFont* font = NULL);
- // works for single as well as multi-line strings
- void GetMultiLineTextExtent(const wxString& text, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT,
- wxFont *font = NULL);
+ DocDeclAStr(
+ void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT),
+ "GetTextExtent(wxString string) -> (width, height)",
+ "Get the width and height of the text using the current font.\n"
+ "Only works for single line strings.");
+ DocDeclAStrName(
+ void, GetTextExtent(const wxString& string,
+ wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT,
+ wxFont* font = NULL),
+ "GetFullTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)",
+ "Get the width, height, decent and leading of the text using the current or specified font.\n"
+ "Only works for single line strings.",
+ GetFullTextExtent);
+
+ // works for single as well as multi-line strings
+ DocDeclAStr(
+ void, GetMultiLineTextExtent(const wxString& text,
+ wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT,
+ wxFont *font = NULL),
+ "GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)",
+ "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.");
+
// size and resolution
// -------------------
- // in device units
- %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
+ DocStr(GetSize, "Get the DC size in device units.");
wxSize GetSize();
+ DocDeclAName(
+ void, GetSize( int *OUTPUT, int *OUTPUT ),
+ "GetSizeTuple() -> (width, height)",
+ GetSizeTuple);
+
- // in mm
- %name(GetSizeMMWH)void GetSizeMM(int* OUTPUT, int* OUTPUT) const;
+ DocStr(GetSizeMM, "Get the DC size in milimeters.");
wxSize GetSizeMM() const;
+ DocDeclAName(
+ void, GetSizeMM( int *OUTPUT, int *OUTPUT ) const,
+ "GetSizeMMTuple() -> (width, height)",
+ GetSizeMMTuple);
+
// coordinates conversions
int GetMapMode() const;
virtual void SetMapMode(int mode);
- virtual void GetUserScale(double *OUTPUT, double *OUTPUT) const;
+
+ DocDeclA(
+ virtual void, GetUserScale(double *OUTPUT, double *OUTPUT) const,
+ "GetUserScale() -> (xScale, yScale)");
+
virtual void SetUserScale(double x, double y);
- virtual void GetLogicalScale(double *OUTPUT, double *OUTPUT);
+
+ DocDeclA(
+ virtual void, GetLogicalScale(double *OUTPUT, double *OUTPUT),
+ "GetLogicalScale() -> (xScale, yScale)");
+
virtual void SetLogicalScale(double x, double y);
- %name(GetLogicalOriginTuple) void GetLogicalOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const;
+
wxPoint GetLogicalOrigin() const;
+ DocDeclAName(
+ void, GetLogicalOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
+ "GetLogicalOriginTuple() -> (x,y)",
+ GetLogicalOriginTuple);
+
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
- %name(GetDeviceOriginTuple) void GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const;
wxPoint GetDeviceOrigin() const;
+ DocDeclAName(
+ void, GetDeviceOrigin(wxCoord *OUTPUT, wxCoord *OUTPUT) const,
+ "GetDeviceOriginTuple() -> (x,y)",
+ GetDeviceOriginTuple);
+
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
wxCoord MaxY() const;
+ DocA(GetBoundingBox,
+ "GetBoundingBox() -> (x1,y1, x2,y2)");
%extend {
void GetBoundingBox(int* OUTPUT, int* OUTPUT, int* OUTPUT, int* OUTPUT);
// See below for implementation
raise ValueError('textlist and coords must have same length')
if foregrounds is None:
foregrounds = []
- elif isinstance(foregrounds, wxColour):
+ elif isinstance(foregrounds, wx.Colour):
foregrounds = [foregrounds]
elif len(foregrounds) != len(coords):
raise ValueError('foregrounds and coords must have same length')
if backgrounds is None:
backgrounds = []
- elif isinstance(backgrounds, wxColour):
+ elif isinstance(backgrounds, wx.Colour):
backgrounds = [backgrounds]
elif len(backgrounds) != len(coords):
raise ValueError('backgrounds and coords must have same length')
public:
// constructs a mirror DC associated with the given real DC
//
- // if mirror parameter is true, all vertical and horizontal coordinates are
+ // if mirror parameter is True, all vertical and horizontal coordinates are
// exchanged, otherwise this class behaves in exactly the same way as a
// plain DC
//
public:
wxPostScriptDC(const wxPrintData& printData);
// %name(PostScriptDC2)wxPostScriptDC(const wxString& output,
-// bool interactive = TRUE,
+// bool interactive = True,
// wxWindow* parent = NULL);
wxPrintData& GetPrintData();
class wxMetaFile : public wxObject {
public:
wxMetaFile(const wxString&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
};
class wxMetaFileDC : public wxClientDC {
public:
wxMetaFileDC(const wxString&, int, int, const wxString&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
};
%}
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
-// bool interactive = TRUE,
+// bool interactive = True,
// int orientation = wxPORTRAIT);
};
class wxPrinterDC : public wxClientDC {
public:
wxPrinterDC(const wxPrintData&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
-// { PyErr_SetNone(PyExc_NotImplementedError); }
+// { wxPyRaiseNotImplemented(); }
};
%}
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
-// bool interactive = TRUE,
+// bool interactive = True,
// int orientation = wxPORTRAIT);
};
#endif