Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / polygons in dbpro

Author
Message
Ermes
20
Years of Service
User Offline
Joined: 27th May 2003
Location: ITALIA
Posted: 17th Jun 2010 12:54
hi all, any idea how to draw filled polygons in dbpro?
really, in all the language i used always there is an instruction like "polygon x1,y1 to x2,y2 to x3,y3..."
but i haven't found in dbpro.
thanks.

ciao faccie da sedere!
Quik
15
Years of Service
User Offline
Joined: 3rd Jul 2008
Location: Equestria!
Posted: 17th Jun 2010 16:31
now, what exactly is a filled polygon? O.o


[Q]uik, Quiker than most
Reaperman
20
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Kent, England
Posted: 17th Jun 2010 16:46
Hi Ermes.....

I dont think we have a polygon x1,y1 to x2,y2 to x3,y3 command, but you can do it using the LINE command. Its format is:
LINE X1,Y1,X2,Y2, so you should be able to draw your poly with it just fine
Ermes
20
Years of Service
User Offline
Joined: 27th May 2003
Location: ITALIA
Posted: 17th Jun 2010 16:56
ok but how to fill it with a color. that's the matter.


ciao faccie da sedere!
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 18th Jun 2010 14:55
if you are just doing squares, rectangles etc then check out the BOX command.

e.g.

box 100,100,400,400, rgb(255,0,0),rgb(0,255,0),rgb(0,0,255),rgb(255,255,255)

note that this will do a gradient fill, with red, green, blue and white in the corners. If you want a single colour just set all of the color values the same

if you are doing complex shapes, do a forum search for 'flood fill'. there are a couple of decent examples from some of he forum geniuses (genii?) that will fill n-gon shapes

This is not the Sig you are looking for....
Ermes
20
Years of Service
User Offline
Joined: 27th May 2003
Location: ITALIA
Posted: 18th Jun 2010 14:56
ok i'll watch by now, thanks

ciao faccie da sedere!

Login to post a reply

Server time is: 2024-04-19 07:23:54
Your offset time is: 2024-04-19 07:23:54