Nick Tyler
|
Newbie - how to find centre of PtRaw
|
Nick Tyler
05/28/2009 4:06 AM
post30209
|
Newbie - how to find centre of PtRaw
Hi,
trying out PhaB, I created a PtRaw in a container, and in the raw draw function, use CalcCanvas to get UL and LR, as per
the examples.
OK...I can draw a line or a grid in the right locations with this.
But...when I try to draw another line based on CalcCanvas-called-from-a-timer-callback (the timer is also in the
container) the line appears in the wrong place, and sometimes moves its location based on resizing the application
window!
I have tried PgGetGC in the raw draw function, passing the result over to a PgSetGC in the timer callback, but to no
avail. (It DID help with the XOR draw, which was trashing a text box until I used PgDefaultMode(pRawCtx) .) But I don't
really know why that helped.
Basically, it appears that I do not know how to access the PtRaw drawing context outside the RawDraw function.
Help?
|
|
|