|
-
Mar 16th, 2001, 12:25 AM
#1
Thread Starter
Frenzied Member
Hi.
I don't really know how to ask this, so I'll just explain my objective instead.
I want to be able to have an image, best example would be a map of the United States. Then depending on certain circumstances, the states would each be colored a different color, for example a climate map where hotter states are red and cooler ones are blue. Then if I click another button, the map will be changed to a new set of colors, for example high population states will be green, and low ones will be yellow.
You see what I mean right?
So the question is, how do I do that?
Should I start with a scanned in image of the US that is plain white with black State borders. And if I do that, then how do I tell VB to fill the color of one state and to stop coloring at the border.
Maybe another way to say it is: how could I write an application that functions similar to a coloring book, coloring in irregular areas of an image?
If you have the answers, or just some helpful hints, please reply. Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Mar 16th, 2001, 12:45 AM
#2
Addicted Member
Try looking up the FloodFill api.
-
Mar 16th, 2001, 08:33 AM
#3
Good Ol' Platypus
You could try an inverted mask for each of the states. An INVERTED mask is when the area you want coloured is white and the rest is black. After that you can specify a backcolor for the picbox and then blit that onto the main picture box.... Since I know the search function is disabled, you can look up how to do this here: (the link is broken as of yet but it will be fixed)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 16th, 2001, 08:34 AM
#4
Good Ol' Platypus
Last edited by Sastraxi; Mar 16th, 2001 at 09:47 AM.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|