GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing docs.wxpython.org — wx.BufferedDC — wxPython 4.3.2 Docs
|
Default constructor. |
|
Get the style. |
|
Initializes the object created using the default constructor. |
|
Set the style. |
|
Blits the buffer to the dc, and detaches the dc from the buffer (so it can be effectively used once only). |
Properties Summary¶
Class API¶Possible constructors:
BufferedDC() -> None BufferedDC(dc, area, style=BUFFER_CLIENT_AREA) -> None BufferedDC(dc, buffer=NullBitmap, style=BUFFER_CLIENT_AREA) -> None
This class provides a simple way to avoid flicker: when drawing on it, everything is in fact first drawn on an in-memory buffer (a Bitmap) and then copied to the screen, using the associated DC, only once, when this object is destroyed.
__init__ (self)
Default constructor.
You must call one of the Init methods later in order to use the device context.
None
__init__ (self, dc, area, style=BUFFER_CLIENT_AREA)
Creates a buffer for the provided dc.
Init must not be called when using this constructor.
dc (wx.DC) – The underlying DC: everything drawn to this object will be flushed to this DC when this object is destroyed. You may pass nullptr in order to just initialize the buffer, and not flush it.
area (wx.Size) – The size of the bitmap to be used for buffering (this bitmap is created internally when it is not given explicitly).
style (int) – wx.BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or wx.BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
None
__init__ (self, dc, buffer=NullBitmap, style=BUFFER_CLIENT_AREA)
Creates a buffer for the provided dc.
Init must not be called when using this constructor.
dc (wx.DC) – The underlying DC: everything drawn to this object will be flushed to this DC when this object is destroyed. You may pass nullptr in order to just initialize the buffer, and not flush it.
buffer (wx.Bitmap) – Explicitly provided bitmap to be used for buffering: this is the most efficient solution 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.
style (int) – wx.BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or wx.BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
None
Get the style.
int
Initializes the object created using the default constructor.
Please see the constructors for parameter details.
Init (self, dc, area, style=BUFFER_CLIENT_AREA)
Init (self, dc, buffer=NullBitmap, style=BUFFER_CLIENT_AREA)
Set the style.
style (int)
None
Blits the buffer to the dc, and detaches the dc from the buffer (so it can be effectively used once only).
Usually only called in the destructor or by the destructor of derived classes if the BufferedDC must blit before the derived class (which may own the dc it’s blitting to) is destroyed.
None