*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);
#include <wx/dcbuffer.h>
%}
+enum {
+ wxBUFFER_VIRTUAL_AREA,
+ wxBUFFER_CLIENT_AREA
+};
MustHaveApp(wxBufferedDC);
as the bitmap doesn't have to be recreated each time but it
also requires more memory as the bitmap is never freed. The
bitmap should have appropriate size, anything drawn outside of
- its bounds is clipped.
-");
- wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
- wxBufferedDC( wxDC *dc, const wxSize &area );
-
+ its bounds is clipped. If wx.NullBitmap is used then a new
+ buffer will be allocated that is the same size as the dc.
-
-// // 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";
-// %RenameCtor(BufferedDCInternalBuffer, wxBufferedDC( wxDC *dc, const wxSize &area ));
+ :param style: The style parameter indicates whether the supplied buffer is
+ intended to cover the entire virtual size of a `wx.ScrolledWindow` or
+ if it only covers the client area. Acceptable values are
+ ``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
+
+");
+ wxBufferedDC( wxDC* dc,
+ const wxBitmap& buffer=wxNullBitmap,
+ int style = wxBUFFER_CLIENT_AREA );
+ wxBufferedDC( wxDC* dc,
+ const wxSize& area,
+ int style = wxBUFFER_CLIENT_AREA );
-
- // The buffer is blit to the real DC when the BufferedDC is destroyed.
DocCtorStr(
~wxBufferedDC(),
"Copies everything drawn on the DC so far to the underlying DC
associated with this object, if any.", "");
-
+
DocDeclStr(
void , UnMask(),
"Blits the buffer to the dc, and detaches the dc from the buffer (so it
dc = wx.BufferedPaintDC(self, self.buffer)
+
+
", "");
class wxBufferedPaintDC : public wxBufferedDC
public:
DocCtorStr(
- wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap ),
+ wxBufferedPaintDC( wxWindow *window,
+ const wxBitmap &buffer = wxNullBitmap,
+ int style = wxBUFFER_CLIENT_AREA),
"Create a buffered paint DC. As with `wx.BufferedDC`, you may either
provide the bitmap to be used for buffering or let this object create
one internally (in the latter case, the size of the client part of the