Henk Jonas wrote:
Luc Le Blanc wrote:
Since coordinates returned by EvtGetPen are in low-res, and that pen
events seem to require to happen in low-res mode, if I want to follow
the pen moves and draw a trace, nut in high-res (i.e. a finer line),
do I have to turn on high-res just before drawing a line segment and
turn it off right away before calling EvtGetPen again? So far, my
attempts to turn on high res during the whole process until the pen is
lifted have produced an odd set of lines, so I'm wondering whether
this was the result of a programming error, or a misuse of the
high-res mode.
As a rule of thumb: Only switch on Hires when you need to draw it. Set
it back when you done, if you need to deal with OS stuff. I believe the
Hires switch is just a flag, and setting/resetting it hasn't a
performance hit at all.
Things work fine now: I convert the first penEvent I get to hi-res
coordinates, then turn on hi-res and recover further pen moves with
EvtGetPenNative and draw lines in hi-res. When the pen is lifted, I turn
off hi-res. With proper ifs, I also made it work on Sony v1 hi-res as
well as legacy low-res. Cool!
Thanks to all.
--
Luc Le Blanc
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/