David Fedor a �crit :

> >To zoom the map in my program, I repeatedly call WinInvertRectangleFrame
> >to draw a zoom rectangle that follows the stylus until the user lifts
> >the stylus (and the map gets zoomed). But on a Tungsten 3 (and only on a
> >T3), starting the zoom rectangle in the upper right corner of the
> >desired area and moving the stylus bottomward and leftward, the
> >rectangle frame horizontal lines do not show. Is there a solution to
> >this?
>
> Before you assume it is a device or API bug, have you tried using the
> debugger and the simulator to make sure you're inverting the correct
> coordinates, etc.?
>
> Debugging pen-related actions can be difficult since hitting a
> breakpoint messes up pen tracking. I find it most useful to send
> trace information to Reporter: try logging the coordinates which
> you're inverting (e.g. HostTraceTL("inverting %hd %hd %hd
> %hd",rect.topLeft.x, etc.), putting in pauses after each invert so
> you are sure you're not doubly-inverting (which would do nothing),
> etc.
>
> And just a thought: if you only get the bug when dragging from the
> upper right corner, perhaps you're passing a negative extent value
> for the rectangle?  I don't know off the top of my head whether
> that's meant to work or not. Try making sure the values are all
> positive.
>
> -David Fedor
> PalmSource, Inc.

Just by trying the program, I can tell coordinates are fine (I'm running low density) 
because the rectangle does follow the
stylus. What is happening: is simple: when dragging the stylus upward, the y extent 
becomes negative, and vertical bars
disappear. Likewise, moving left, the x extent becomes negative, and horizontal bars 
disappear. And moving upward leftward, no
frame is displayed at all!

Sounds like a faulty API implementation to me: it works fine on all other devices, 
which handle negative extents very well. To
make it work on a T3, I'd have to check for negative extents and then swap fiddle with 
rectangle coordinates - a little clumsy.

I'll trade a reporter file for an OS patch ;)


--
Luc Le Blanc


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

Reply via email to