You will need to filter the event yourself.  It has been my finding that there is 
about two to three pixels of noise from the LCD's
digitizer.  On a penDown, you can save the coordinates of where you are. On a penMove 
or penUp event, compare the coordinates there
to the one from last saved coordinates.

If the difference in either the x or y is greater than your threshold (I suggest two 
to four pixels) draw a line between the two
coordinates and update the saved coordinates from what you got in penMove.  It does 
make you drawing less precise, but it is the
best I have found so far due to the inherent noise of the digitizer.

Steve

Jose Rodriguez Ruibal wrote:

> Hello Palm Forum,
>
>       I would like to draw a single point when I do a "penDown" event
>       on a gadget. Here is the code I used on my gadget event
>       handler...
>
>       case penDownEvent:
>          GetObjectBounds(PGadget, &bounds);
>          if (RctPtInRectangle(eventP->screenX, eventP->screenY, &bounds)) {
>             WinDrawLine(eventP->screenX, eventP->screenY, eventP->screenX +1, 
>eventP->screenY+1);
>          handled = true;
>       }
>       break;
>
>       I draw a single point, OK, but the precision I get don't please
>       me a lot...  How can I use also the "penMove" event to
>       make an "action radius" getting the penDown event? Is there
>       another kind of making my pendown event less sensible?
>
>       Thank you a lot!
>
> --
> Best regards,
>  Jose Rodriguez Ruibal
>
> NIT (Nomad Information Tech)
> e-mail: mailto:[EMAIL PROTECTED]
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to