Erlang logo
User's Guide
Reference Manual
Release Notes
PDF
Top

wxErlang
Reference Manual
Version 1.8


Expand All
Contract All

Table of Contents

wxGraphicsContext

MODULE

wxGraphicsContext

MODULE SUMMARY

See external documentation: wxGraphicsContext.

DESCRIPTION

See external documentation: wxGraphicsContext.

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

DATA TYPES

wxGraphicsContext()

An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes.

EXPORTS

create() -> wxGraphicsContext()

create(Dc) -> wxGraphicsContext()

createPen(This, Pen) -> wxGraphicsPen:wxGraphicsPen()

Types:

createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush()

Types:

createRadialGradientBrush(This, Xo, Yo, Xc, Yc, Radius, OColor, CColor) -> wxGraphicsBrush:wxGraphicsBrush()

Types:

Xo = number()
Yo = number()
Xc = number()
Yc = number()
Radius = number()
OColor = wx:wx_colour()
CColor = wx:wx_colour()

This function is deprecated: deprecated function not available in wxWidgets-2.9 and later

See external documentation.

createLinearGradientBrush(This, X1, Y1, X2, Y2, C1, C2) -> wxGraphicsBrush:wxGraphicsBrush()

Types:

X1 = number()
Y1 = number()
X2 = number()
Y2 = number()

This function is deprecated: deprecated function not available in wxWidgets-2.9 and later

See external documentation.

createFont(This, Font) -> wxGraphicsFont:wxGraphicsFont()

Types:

createFont(This, Font, Options::[Option]) -> wxGraphicsFont:wxGraphicsFont()

Types:

Option = {col, wx:wx_colour()}

createMatrix(This) -> wxGraphicsMatrix:wxGraphicsMatrix()

Types:

Equivalent to createMatrix(This, []).

createMatrix(This, Options::[Option]) -> wxGraphicsMatrix:wxGraphicsMatrix()

Types:

Option = {a, number()} | {b, number()} | {c, number()} | {d, number()} | {tx, number()} | {ty, number()}

createPath(This) -> wxGraphicsPath:wxGraphicsPath()

Types:

clip(This, Region) -> ok

Types:

clip(This, X, Y, W, H) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()

resetClip(This) -> ok

Types:

drawBitmap(This, Bmp, X, Y, W, H) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()

drawEllipse(This, X, Y, W, H) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()

drawIcon(This, Icon, X, Y, W, H) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()

drawLines(This, Points) -> ok

Types:

Points = [{X::float(), Y::float()}]

drawLines(This, Points, Options::[Option]) -> ok

Types:

Points = [{X::float(), Y::float()}]
Option = {fillStyle, wx:wx_enum()}

See external documentation.
FillStyle = integer

drawPath(This, Path) -> ok

Equivalent to drawPath(This, Path, []).

drawPath(This, Path, Options::[Option]) -> ok

Types:

Option = {fillStyle, wx:wx_enum()}

See external documentation.
FillStyle = integer

drawRectangle(This, X, Y, W, H) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()

drawRoundedRectangle(This, X, Y, W, H, Radius) -> ok

Types:

X = number()
Y = number()
W = number()
H = number()
Radius = number()

drawText(This, Str, X, Y) -> ok

Types:

X = number()
Y = number()

drawText(This, Str, X, Y, Angle) -> ok

Types:

X = number()
Y = number()
Angle = number()

See external documentation.
Also:
drawText(This, Str, X, Y, BackgroundBrush) -> 'ok' when
This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().

drawText(This, Str, X, Y, Angle, BackgroundBrush) -> ok

Types:

X = number()
Y = number()
Angle = number()

fillPath(This, Path) -> ok

Equivalent to fillPath(This, Path, []).

fillPath(This, Path, Options::[Option]) -> ok

Types:

Option = {fillStyle, wx:wx_enum()}

See external documentation.
FillStyle = integer

strokePath(This, Path) -> ok

getPartialTextExtents(This, Text) -> [number()]

getTextExtent(This, Text) -> Result

Types:

Result = {Width::number(), Height::number(), Descent::number(), ExternalLeading::number()}

rotate(This, Angle) -> ok

Types:

Angle = number()

scale(This, XScale, YScale) -> ok

Types:

XScale = number()
YScale = number()

translate(This, Dx, Dy) -> ok

Types:

Dx = number()
Dy = number()

getTransform(This) -> wxGraphicsMatrix:wxGraphicsMatrix()

Types:

setTransform(This, Matrix) -> ok

concatTransform(This, Matrix) -> ok

setBrush(This, Brush) -> ok

setFont(This, Font) -> ok

setFont(This, Font, Colour) -> ok

Types:

Colour = wx:wx_colour()

setPen(This, Pen) -> ok

strokeLine(This, X1, Y1, X2, Y2) -> ok

Types:

X1 = number()
Y1 = number()
X2 = number()
Y2 = number()

strokeLines(This, Points) -> ok

Types:

Points = [{X::float(), Y::float()}]

destroy(This::wxGraphicsContext()) -> ok

Destroys this object, do not use object again