wxGCDC — wx v2.4.2

Search documentation of wx

# View Source wxGCDC (wx v2.4.2)

Functions for wxGCDC class

`wxGCDC` is a device context that draws on a `wxGraphicsContext`.

`wxGCDC` does its best to implement `wxDC` API, but the following features are not (fully) implemented because `wxGraphicsContext` doesn't support them:

See: `wxDC`, `wxGraphicsContext`

This class is derived (and can use functions) from: `wxDC`

wxWidgets docs: wxGCDC

# Summary

## Types

wxGCDC()

## Functions

destroy(This)
getGraphicsContext(This)

Retrieves associated `wxGraphicsContext`.

new()
new(WindowDC)

Constructs a `wxGCDC` from a `wxWindowDC`.

setGraphicsContext(This, Context)

Set the graphics context to be used for this `wxGCDC`.

# Types

Link to this type

# wxGCDC()

View Source

    -type wxGCDC() :: wx:wx_object().

# Functions

Link to this function

# destroy(This)

View Source

    -spec destroy(This :: wxGCDC()) -> ok.

Link to this function

# getGraphicsContext(This)

View Source

    -spec getGraphicsContext(This) -> wxGraphicsContext:wxGraphicsContext() when This :: wxGCDC().

Retrieves associated `wxGraphicsContext`.

Link to this function

# new()

View Source

    -spec new() -> wxGCDC().

Link to this function

# new(WindowDC)

View Source

    -spec new(WindowDC) -> wxGCDC()
                 when
                     WindowDC ::
                         wxWindowDC:wxWindowDC() |
                         wxMemoryDC:wxMemoryDC() |
                         wxGraphicsContext:wxGraphicsContext().

Constructs a `wxGCDC` from a `wxWindowDC`.

Link to this function

# setGraphicsContext(This, Context)

View Source

    -spec setGraphicsContext(This, Context) -> ok
                                when This :: wxGCDC(), Context :: wxGraphicsContext:wxGraphicsContext().

Set the graphics context to be used for this `wxGCDC`.

Note that this object takes ownership of `context` and will delete it when it is destroyed or when `setGraphicsContext/2` is called again.

Also, unlike the constructor taking `wxGraphicsContext`, 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 `wxGCDC` directly from `wxGraphicsContext`).