Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Joel on Software
Message
 
À
17/05/2005 16:53:29
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01014573
Message ID:
01015128
Vues:
34
>I've done some extensive PostScript coding last weekend, and believe me, it's fun... and frustrating at times. Of course, I'm generating most of the stuff from VFP (and then submitting to GhostScript to render into a .png), because the numbers to crunch therein come from a distant SQL server, and need to be further squeezed out of several SPT cursors... but in the end it gives me a nice on-the-fly bitmap from my data, in any resolution I may wish for. Here's a piece which draws rays of different length - about 5 pixels for each degree, 10 for each 5th degree and 16 for each 10th degree:
>
>
	/rays {
>		/r exch def
>		0 1 359 {
>			dup
>			/len10 exch 10 mod def
>			/len5 exch 5 mod def
>			r 0 moveto
>			len10 0 eq {  Rad2 r sub }
>			{ len5 0 eq { 10 } { 5 } ifelse } ifelse
>			0 rlineto
>			stroke
>			1 rotate
>		} for
>	} def
>
>Note the ifelse block which executes the code in matching braces - the 2nd on stack if 3rd on stack is true, or 1st on stack if not :).
>
>You'll love Fox more after this :)

You don't have much of a night life:-)
What is being rendered - what are the renderings used for? What is the raw data - is it an image - or data to create the image?
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform