PDA

View Full Version : Fill in colors



Never
03-17-2008, 10:02 PM
currently i had done drawing tis polygon

glBegin(GL_POLYGON); // Draw A polygon
glVertex3f(1.5f, 0.0f, 0.0f);
glVertex3f(1.0f, 1.0f, 0.0f);
glVertex3f(1.5f, 0.5f, 0.0f);
glVertex3f(0.5f, 1.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.5f, 0.0f, 0.0f);

now i wana to do color filling with two algorithm which is scan-line and boundry-fill. can anyone help me with this ?

Lindley
03-18-2008, 01:32 PM
I'm afraid I'm not sure what you're asking for.

Stuart McDonald
03-21-2008, 12:42 AM
I think what they are asking is if the polygon was drawn with lines how would you fill it with a color using the two algorithms. I assume scan-line means drawing horizontal lines to fill it and boundary fill is "fill this pixel then fill all it's neighbors that aren't filled".

Sounds like the a really pointless homework question...

tanzanite
03-21-2008, 02:20 AM
crosspost + wrong forum = all fine?

Not that it bothers me too much, but i vaguely remember that we had some moderators once ... or something. What do they do? Too busy with their own stuff? ... just asking.