View Full Version : Fill in colors

03-17-2008, 11: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 ?

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

Stuart McDonald
03-21-2008, 01: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...

03-21-2008, 03: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.