wxRuby Documentation Home

# Wx::ScreenDC

A ScreenDC can be used to paint on the screen.
This should normally be constructed as a temporary stack object; don’t store
a ScreenDC object.

## Derived from

DC

## See also

DC, MemoryDC, PaintDC, ClientDC, WindowDC

## Methods

- ScreenDC.new
- ScreenDC#start_drawing_on_top
- ScreenDC#end_drawing_on_top

### ScreenDC.new

### ScreenDC#start_drawing_on_top

Boolean start_drawing_on_top(%(arg-type)Window% window) Boolean start_drawing_on_top(%(arg-type)Rect% rect = nil)

Use this in conjunction with end_drawing_on_top 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.

By using the first form of this function, an application is specifying that
the area that will be drawn on coincides with the given window.

By using the second form, an application can specify an area of the screen
which is to be drawn on. If NULL is passed, the whole screen is available.

It is recommended that an area of the screen is specified because with large regions,
flickering effects are noticeable when destroying the temporary transparent window used
to implement this feature.

You might use this pair of functions when implementing a drag feature, for example
as in the SplitterWindow implementation.

#### Remarks

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.

### ScreenDC#end_drawing_on_top

Boolean end_drawing_on_top()

Use this in conjunction with start_drawing_on_top.

This function destroys the temporary window created to implement on-top drawing (X only).

[This page automatically generated from the Textile source at 2023-06-09 00:45:32 +0000]