Drw

Drw provides an interface for working with drawable surfaces.

Constructors

this
this(Display* dpy, int screen, Window root, uint w, uint h)

Ctor to initialise the draw object

Members

Functions

destroy
void destroy()

Destroy the X resources used by this drawable.

map
void map(Window win, int x, int y, uint w, uint h)

Copy the drawable area to a window.

rect
void rect(int x, int y, uint w, uint h, int filled, int empty, int invert)

Draw a rectangle to the X display using the current settings. Note that filled and empty are not mutually exclusive.

resize
void resize(uint w, uint h)

Resize the drawable to a new width and height

setfont
void setfont(Fnt* font)

Set the font to use for rendering.

setscheme
void setscheme(ClrScheme* scheme)

Set the scheme for this drawable

text
void text(int x, int y, uint w, uint h, in string text, int invert)

Render some text to the display using the current font.

Static functions

free
void free(Drw* drw)

Release the GC memory used for the Drw object

Variables

dpy
Display* dpy;

The X display

drawable
Drawable drawable;

The X drawable encapsulated by this.

font
Fnt* font;

The X font to use for rendering text.

gc
XGC gc;

The X graphic context

h
uint h;

The width and height of the drawable area

root
Window root;

The root window for this drawable

scheme
ClrScheme* scheme;

The colour scheme to use

screen
int screen;

The X screen ID

Meta