PgDrawxxx functions

Hi,
How to use PgDraw… functions ?
Is any setup function before using PgDrawIRect() ?
I use PgCreateGC(), and still does not work.
what is setup sequence for drawing line, rect, etc on the screen ?

DrawRect() {
PgCreateGC();
PgSetFillColor(Pg_YELLOW);
PgDrawIRect(0, 0, 100, 100, Pg_DRAW_FILL);
}

simon

How to use PgDraw… functions ?
Is any setup function before using PgDrawIRect() ?
I use PgCreateGC(), and still does not work.
what is setup sequence for drawing line, rect, etc on the screen ?

First create a window by PtCreateWidget (PtWindow, …)
Then create a PtRaw by PtCreateWidget (PtRaw, …), attaching it to the
window you just created.
Then PtRealize() the window
and call any PgDraw…() you need.

If you window may be hidden then redrawn, you’ll have to store in some
place all the drawing calls you need to refresh it.


Gilles Barges
software engineer, Technicatome