Advertisement

Color Fills In VB

Started by June 12, 2000 02:56 PM
3 comments, last by Spanky 24 years, 6 months ago
Ok, I have another question As I don''t use Visual Basic much (ever actually) I don''t know the graphics system. I have defined 3 lines that come together to form a triangle. They are drawn onto the form. My question would be how would I color those in. Like is there a function that I can do that will fill at a certain point till it hits another color. I could do it in QBasic (god that was a long time ago ) but I dont know how in VB. Thanks Shawn
Oh god spanky, if you are making a game, it''s gonna be a pain in the ass that way. Well, if you must, there''s a winapi function that can do it. I think it''s the polyfill call. I''m not sure and I never got it to work correctly. Good luck anyway.

------------------------
Captured Reality.
Advertisement
You want to fill the triangle or color the lines of the triangle?

To color the line you just add a comma (or two) after it and then put "RGB(RedValue,GreenValue,BlueValue)" (Look in the syntax reference as two how many comma''s because you have to skip another variable to add the color.

Good luck!
See ya,
Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
Oh yeah, if that doesn''t work, you could try floodfill, but it won''t be so accurate.

------------------------
Captured Reality.
Thanks a lot guys. I am not making my game this way, I am just using Visual Basic to make the basic ship editor. It doesn''t need to be anything fancy which is why I choose to use VB for it instead of making some fancy stuff in Visual C++. The actuall game is in Visual C++ using OpenGL. It should be pretty good. I have a bit done on it so far, ship movement, bullet firing, rotation variables, a lot of neat stuff Still a long way away though but thanks for the help.

This topic is closed to new replies.

Advertisement