APOLY how to use ?

Bah, tout est dit non ?

APOLY how to use ?

Messagede hylst » Jeu 26 Mai 2011 16:44

I'm not sure of my way of using APOLY, used to POLYFILL that is slower.
I've tried :

m&=-1 ! motif
m%=V:m&
DIM xyp(6) ! tableau des coordonnes quel format choisir ? & pour des mots devrait suffire ?!
xyp(0)=319 ! coordonnee d'un triangle x puis y 3 point
xyp(1)=0
xyp(2)=319
xyp(3)=99
xyp(4)=159
xyp(5)=0
pnt%=V:xyp(0)
APOLY pnt%,3,0 TO 199,15,0,m%,0 _ pnt% : pointeurs coord - 3 nbre de points - 0 y min - 199 ymax - 15 couleur - 0 mode affich (rempl) - m% motif (continu) - 0 num de motif

what's wrong with this use of apoly ?
Let's visit my personal website http://hylst.t15.org !
hylst
 
Messages: 184
Inscription: Mer 27 Avr 2011 17:17
Localisation: France Strasbourg

Re: APOLY how to use ?

Messagede lp060 » Lun 30 Mai 2011 11:40

Maybe this example helps:

Code: Tout sélectionner
m&=-1 !solid
m%=V:m&
DIM xyp&(6)
xyp&(0)=319
xyp&(1)=0
xyp&(2)=319
xyp&(3)=99
xyp&(4)=159
xyp&(5)=0
pnt%=V:xyp&(0)
APOLY pnt%,4,0 TO 199,1,0,m%,0


Since the x/y are passed as a pointer, the array must be word type and not float type. The Line-A is expecting word size x/y values and has no idea how to interpret GFA float values. ;)
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: APOLY how to use ?

Messagede hylst » Lun 30 Mai 2011 12:21

Hello and thanks again.
I don't undersatnt why, but i used first time word arrays& but it results on nothing, and even sometimes reboot.
I tried again, and then... it worked... i really wonder ... if i don't use narcotics sometimes....
but no... no narcotics, no alcohol, and even no smoking ! I really wonder... :mrgreen:
Let's visit my personal website http://hylst.t15.org !
hylst
 
Messages: 184
Inscription: Mer 27 Avr 2011 17:17
Localisation: France Strasbourg

Re: APOLY how to use ?

Messagede hylst » Lun 30 Mai 2011 12:36

But... why 4 after pnt% ? As there are 3 points and not 4 in the polygon.
Let's visit my personal website http://hylst.t15.org !
hylst
 
Messages: 184
Inscription: Mer 27 Avr 2011 17:17
Localisation: France Strasbourg

Re: APOLY how to use ?

Messagede lp060 » Lun 30 Mai 2011 19:49

I was going by the example in the manual. I'm not exactly sure, does it fail with 3?
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: APOLY how to use ?

Messagede hylst » Lun 30 Mai 2011 22:03

Yes.
New GFA demo revisited thanks in part to you :)
http://pouet.net/prod.php?which=57039
Let's visit my personal website http://hylst.t15.org !
hylst
 
Messages: 184
Inscription: Mer 27 Avr 2011 17:17
Localisation: France Strasbourg


Retourner vers Questions/aide

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité

cron