wx.ScreenDC¶
A wx.ScreenDC can be used to paint on the screen.
This should normally be constructed as a temporary stack object; don’t store a wx.ScreenDC object.
When using multiple monitors, wx.ScreenDC corresponds to the entire virtual screen composed of all of them. Notice that coordinates on wx.ScreenDC can be negative in this case, see wx.Display.GetGeometry
for more.
See also
Class Hierarchy¶
Methods Summary¶
Constructor. |
|
Use this in conjunction with |
|
Use this in conjunction with |
Class API¶
- class wx.ScreenDC(DC)¶
Possible constructors:
ScreenDC() -> None
A ScreenDC can be used to paint on the screen.
Methods¶
- __init__(self)¶
Constructor.
- Return type:
None
- static EndDrawingOnTop()¶
Use this in conjunction with
StartDrawingOnTop
.This function destroys the temporary window created to implement on-top drawing (X only).
- Return type:
bool
- static StartDrawingOnTop(*args, **kw)¶
-
StartDrawingOnTop (window)
Use this in conjunction with
EndDrawingOnTop
to ensure that drawing to the screen occurs on top of existing windows.Without this, some window systems (such as X) only allow drawing to take place underneath other windows.
This version of
StartDrawingOnTop
is used to specify that the area that will be drawn on coincides with the given window. It is recommended that an area of the screen is specified withStartDrawingOnTop
because with large regions, flickering effects are noticeable when destroying the temporary transparent window used to implement this feature.You might use this function when implementing a drag feature, for example as in the wx.SplitterWindow implementation.
- Parameters:
window (wx.Window)
- Return type:
bool
Note
This function is probably obsolete since the X implementations allow drawing directly on the screen now. However, the fact that this function allows the screen to be refreshed afterwards, may be useful to some applications.
StartDrawingOnTop (rect=None)
Use this in conjunction with
EndDrawingOnTop
to ensure that drawing to the screen occurs on top of existing windows.Without this, some window systems (such as X) only allow drawing to take place underneath other windows.
This version of
StartDrawingOnTop
is used to specify an area of the screen which is to be drawn on. IfNone
is passed, the whole screen is available. It is recommended that an area of the screen is specified with this function rather than withStartDrawingOnTop
, because with large regions, flickering effects are noticeable when destroying the temporary transparent window used to implement this feature.You might use this function when implementing a drag feature, for example as in the wx.SplitterWindow implementation.
- Parameters:
rect (wx.Rect)
- Return type:
bool
Note
This function is probably obsolete since the X implementations allow drawing directly on the screen now. However, the fact that this function allows the screen to be refreshed afterwards, may be useful to some applications.