Never did come up with a formula. So used the following code to "find" the
relationship between screen coordinates and digitizer coordinates. Not very
elegant, but workable.
#define maxDigiX 160 // Garmin iQue 3600 screen size
#define maxDigiY 225
Coord digiX[maxDigiX], digiY[maxDigiY]; // digitizer coordinates for
screen coordinates
Coord x, y;
PointType point;
Boolean notDone, isPenDown;
notDone = true;
point.x = 0;
point.y = 100;
while (notDone) // find x coord of digitizer
{
EvtFlushPenQueue();
point.x++;
EvtEnqueuePenPoint(&point);
EvtGetPen(&x, &y, &isPenDown);
if (x >= maxDigiX - 1)
notDone = false;
digiX[x] = point.x;
}
notDone = true;
point.x = 100;
point.y = 0;
while (notDone) // find y coord of digitizer
{
EvtFlushPenQueue();
point.y++;
EvtEnqueuePenPoint(&point);
EvtGetPen(&x, &y, &isPenDown);
if (y >= maxDigiY - 1)
notDone = false;
digiY[y] = point.y;
}
EvtFlushPenQueue();
"RVRoadie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I want to generate some simulated x,y pen taps from an AlarmTrigger.
>
> EvtEnqueuePenPoint works fine for this purpose on the simulator since it
> uses the same x,y coordinate system that the application event handler
> uses.
>
> However, on a device (Garmin iQue 3600), this function wants the hardware
> coordinates used by the digitizer. I wrote a simple test to try to
> determine what the translation is, but no simple function has presented
> itself. Is there some way to get this info from the device, and translate
> the traditional x,y coordinates to what this function requires.
>
> Thanks for any assistance.
>
> Tom
>
>
>
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/