~wxDC();
- DocDeclStr(
- virtual void , BeginDrawing(),
- "Allows for optimization of drawing code on platforms that need it. On
-other platforms this is just an empty function and is harmless. To
-take advantage of this postential optimization simply enclose each
-group of calls to the drawing primitives within calls to
-`BeginDrawing` and `EndDrawing`.", "");
-
- DocDeclStr(
- virtual void , EndDrawing(),
- "Ends the group of drawing primitives started with `BeginDrawing`, and
-invokes whatever optimization is available for this DC type on the
-current platform.", "");
+ %pythoncode {
+ %# These have been deprecated in wxWidgets. Since they never
+ %# really did anything to begin with, just make them be NOPs.
+ def BeginDrawing(self): pass
+ def EndDrawing(self): pass
+ }
-
+
// TODO virtual void DrawObject(wxDrawObject* drawobject);
bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
%Rename(FloodFillPoint, bool, FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE));
+ // fill the area specified by rect with a radial gradient, starting from
+ // initialColour in the centre of the cercle and fading to destColour.
+
+ DocDeclStr(
+ void , GradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter),
+ "Fill the area specified by rect with a radial gradient, starting from
+initialColour in the center of the circle and fading to destColour on
+the outside of the circle. The circleCenter argument is the relative
+coordinants of the center of the circle in the specified rect.
+
+Note: Currently this function is very slow, don't use it for real-time
+drawing.", "");
+
+
+ DocDeclStr(
+ void , GradientFillLinear(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ wxDirection nDirection = wxEAST),
+ "Fill the area specified by rect with a linear gradient, starting from
+initialColour and eventually fading to destColour. The nDirection
+parameter specifies the direction of the colour change, default is to
+use initialColour on the left part of the rectangle and destColour on
+the right side.", "");
+
+
DocStr(
GetPixel,
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
+ "GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, lineHeight)",
+ "Get the width, height, and line height of the text using the
current or specified font. Works for single as well as multi-line
strings.", "");
*text*. The generic version simply builds a running total of the widths
of each character using GetTextExtent, however if the various
platforms have a native API function that is faster or more accurate
-than the generic implementaiton then it will be used instead.", "");
+than the generic implementation then it will be used instead.", "");
wxArrayInt GetPartialTextExtents(const wxString& text) {
wxArrayInt widths;
self->GetPartialTextExtents(text, widths);
DocDeclStr(
virtual wxSize , GetPPI() const,
- "Resolution in Pixels per inch", "");
+ "Resolution in pixels per inch", "");
DocDeclStr(
return self._DrawTextList(textList, coords, foregrounds, backgrounds)
}
+ %property(Background, GetBackground, SetBackground, doc="See `GetBackground` and `SetBackground`");
+ %property(BackgroundMode, GetBackgroundMode, SetBackgroundMode, doc="See `GetBackgroundMode` and `SetBackgroundMode`");
+ %property(BoundingBox, GetBoundingBox, doc="See `GetBoundingBox`");
+ %property(Brush, GetBrush, SetBrush, doc="See `GetBrush` and `SetBrush`");
+ %property(CharHeight, GetCharHeight, doc="See `GetCharHeight`");
+ %property(CharWidth, GetCharWidth, doc="See `GetCharWidth`");
+ %property(ClippingBox, GetClippingBox, doc="See `GetClippingBox`");
+ %property(ClippingRect, GetClippingRect, SetClippingRect, doc="See `GetClippingRect` and `SetClippingRect`");
+ %property(Depth, GetDepth, doc="See `GetDepth`");
+ %property(DeviceOrigin, GetDeviceOrigin, SetDeviceOrigin, doc="See `GetDeviceOrigin` and `SetDeviceOrigin`");
+ %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
+ %property(FullTextExtent, GetFullTextExtent, doc="See `GetFullTextExtent`");
+ %property(LogicalFunction, GetLogicalFunction, SetLogicalFunction, doc="See `GetLogicalFunction` and `SetLogicalFunction`");
+ %property(LogicalOrigin, GetLogicalOrigin, SetLogicalOrigin, doc="See `GetLogicalOrigin` and `SetLogicalOrigin`");
+ %property(LogicalScale, GetLogicalScale, SetLogicalScale, doc="See `GetLogicalScale` and `SetLogicalScale`");
+ %property(MapMode, GetMapMode, SetMapMode, doc="See `GetMapMode` and `SetMapMode`");
+ %property(MultiLineTextExtent, GetMultiLineTextExtent, doc="See `GetMultiLineTextExtent`");
+ %property(Optimization, GetOptimization, SetOptimization, doc="See `GetOptimization` and `SetOptimization`");
+ %property(PPI, GetPPI, doc="See `GetPPI`");
+ %property(PartialTextExtents, GetPartialTextExtents, doc="See `GetPartialTextExtents`");
+ %property(Pen, GetPen, SetPen, doc="See `GetPen` and `SetPen`");
+ %property(Pixel, GetPixel, doc="See `GetPixel`");
+ %property(PixelPoint, GetPixelPoint, doc="See `GetPixelPoint`");
+ %property(Size, GetSize, doc="See `GetSize`");
+ %property(SizeMM, GetSizeMM, doc="See `GetSizeMM`");
+ %property(TextBackground, GetTextBackground, SetTextBackground, doc="See `GetTextBackground` and `SetTextBackground`");
+ %property(TextExtent, GetTextExtent, doc="See `GetTextExtent`");
+ %property(TextForeground, GetTextForeground, SetTextForeground, doc="See `GetTextForeground` and `SetTextForeground`");
+ %property(UserScale, GetUserScale, SetUserScale, doc="See `GetUserScale` and `SetUserScale`");
};
`wx.Bitmap`) and then copied to the screen only once, when this object
is destroyed.
-It can be used in the same way as any other device
-context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
-want to use it in your EVT_PAINT handler, you should look at
+It can be used in the same way as any other device context.
+wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
+use it in your EVT_PAINT handler, you should look at
`wx.BufferedPaintDC`.
+
+Please note that GTK+ 2.0 and OS X provide double buffering themselves
+natively so using this class on those platforms will normally result
+in an unneeded level of buffering.
", "");
class wxBufferedDC : public wxMemoryDC
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxWindowDC);
+
+DocStr(wxWindowDC,
+ "A wx.WindowDC must be constructed if an application wishes to paint on
+the whole area of a window (client and decorations). This should
+normally be constructed as a temporary stack object; don't store a
+wx.WindowDC object.","");
+class wxWindowDC : public wxDC {
+public:
+ DocCtorStr(
+ wxWindowDC(wxWindow* win),
+ "Constructor. Pass the window on which you wish to paint.","");
+};
+
+//---------------------------------------------------------------------------
+%newgroup
+
MustHaveApp(wxClientDC);
DocStr(wxClientDC,
To draw on the whole window including decorations, construct a
`wx.WindowDC` object (Windows only).
", "");
-class wxClientDC : public wxDC {
+class wxClientDC : public wxWindowDC {
public:
DocCtorStr(
wxClientDC(wxWindow* win),
To draw on a window from outside EVT_PAINT handlers, construct a
`wx.ClientDC` object.
","");
-class wxPaintDC : public wxDC {
+class wxPaintDC : public wxClientDC {
public:
DocCtorStr(
wxPaintDC(wxWindow* win),
//---------------------------------------------------------------------------
%newgroup
-MustHaveApp(wxWindowDC);
-
-DocStr(wxWindowDC,
- "A wx.WindowDC must be constructed if an application wishes to paint on
-the whole area of a window (client and decorations). This should
-normally be constructed as a temporary stack object; don't store a
-wx.WindowDC object.","");
-class wxWindowDC : public wxDC {
-public:
- DocCtorStr(
- wxWindowDC(wxWindow* win),
- "Constructor. Pass the window on which you wish to paint.","");
-};
-
-//---------------------------------------------------------------------------
-%newgroup
-
MustHaveApp(wxMirrorDC);
DocStr(wxMirrorDC,
DocDeclStr(
static int , GetResolution(),
"Return resolution used in PostScript output.", "");
+
+ %property(PrintData, GetPrintData, SetPrintData, doc="See `GetPrintData` and `SetPrintData`");
};
//---------------------------------------------------------------------------