|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1420 |
PENX and PENY |
le 28/05/2006 @ 14:25 par Garfield
|
Hi
I've noticed that PENX and PENY will only return values between 0 and 159, even if the screen has been set to high resolution.
Shouldn't PENX and PENY also respect high resolutions?
Thanks.
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 28/05/2006 @ 15:39 par aldweb
visiteur |
Hi Garfield,
The Palm HighRes APIs is some kind of hack on a system built to work in lowres only. As stated in the user manual, this how you should always proceed in your code, to work quite smoothly with this kind of stuff (due to Palm OS and I did not want to get things to complex in the code to have iziBasic handle highres mode in a smoother way): 1. switch to highres 2. draw some thing(s) 3. switch back immediately to lowres Never remain in highres.
Then, PENX and PENY do not draw, they retrieve some values, this is why they stick in the [0..159] range. Furthermore, 1 pixel out of a 160x160 pixels resolution is already more precise than the tap of a stylus on the screen!
Cheers,
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 29/05/2006 @ 04:42 par bh77a
visiteur |
For drawing on screen with a pen in high res, try this (the original code is Aldweb's from a ways back in the forums but modified by me). This should give you one way to
BEGIN R=HIGHRES(1) REPEAT E=DOEVENTS IF E=1000 THEN p=PENDOWN IF p=1 IF q=0 LET x=PENX*2 : y=PENY*2 : PSET x,y IF p=1 IF q=1 LET x=PENX*2 : y=PENY*2 LINETO x,y q=p ENDIF UNTIL E=-1 R=HIGHRES(0) END |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 30/05/2006 @ 22:15 par aldweb
visiteur |
Yes, this is smart and quick.
Cheers, aldweb
|
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|