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.GCDC — wxPython 4.3.2 Docs
|
Constructs a wx.GCDC from a wx.WindowDC. |
|
Retrieves associated wx.GraphicsContext. |
|
Set the graphics context to be used for this wx.GCDC. |
Properties Summary¶See |
Class API¶Possible constructors:
GCDC(windowDC) -> None GCDC(memoryDC) -> None GCDC(printerDC) -> None GCDC(context) -> None GCDC() -> None
GCDC is a device context that draws on a GraphicsContext.
__init__ (self, windowDC)
Constructs a wx.GCDC from a wx.WindowDC.
windowDC (wx.WindowDC)
None
__init__ (self, memoryDC)
Constructs a wx.GCDC from a wx.MemoryDC.
memoryDC (wx.MemoryDC)
None
__init__ (self, printerDC)
Constructs a wx.GCDC from a wx.PrinterDC.
printerDC (wx.PrinterDC)
None
__init__ (self, context)
Construct a wx.GCDC from an existing graphics context.
Note that this object takes ownership of context and will delete it when it is destroyed or when SetGraphicsContext is called with a different context object.
Also notice that context will continue using the same font, pen and brush as before until SetFont , SetPen or SetBrush is explicitly called to change them. This means that the code can use this DC-derived object to work using pens and brushes with alpha component, for example (which normally isn’t supported by wx.DC API), but it also means that the return values of GetFont , GetPen and GetBrush won’t really correspond to the actually used objects because they simply can’t represent them anyhow. If you wish to avoid such discrepancy, you need to call the setter methods to bring wx.DC and wx.GraphicsContext font, pen and brush in sync with each other.
context (wx.GraphicsContext)
None
__init__ (self)
None
Retrieves associated wx.GraphicsContext.
Set the graphics context to be used for this wx.GCDC.
Note that this object takes ownership of context and will delete it when it is destroyed or when SetGraphicsContext is called again.
Also, unlike the constructor taking wx.GraphicsContext, this method will reapply the current font, pen and brush, so that this object continues to use them, if they had been changed before (which is never the case when constructing wx.GCDC directly from wx.GraphicsContext).
context (wx.GraphicsContext)
None
See GetGraphicsContext and SetGraphicsContext