aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1420

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1420  PENX and PENY

28/05/2006 @ 14:25
by Garfield

Anonymous



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.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
28/05/2006 @ 15:39
by aldweb

Anonymous

visitor
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
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
29/05/2006 @ 04:42
by bh77a

Anonymous

visitor
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
Write to bh77a   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
30/05/2006 @ 22:15
by aldweb

Anonymous

visitor
Yes, this is smart and quick.

Cheers,
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^