Click here to Skip to main content
15,942,449 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to create a dynamic loop so that i can be able to draw lines of different colors with many segments showcasing the users/drivers traffic routes on a bitmap image which is already created and saved on my desktop hdd.the diffrent colors will have their meaning according to the station ID(from Database "HEIDI SQL",i need to know what methods i should call and class i should use,to create this "dYNAMIC LOOP" because the would be different user at different time intervals hence there are going to be many diffrent line segments on my map(bitmap image)please be as specific as possible i am still very new gdi+ and c# basically i need to draw lines of different segments with different colors on my bitmap image using console application,thanks in advance.
Posted
Comments
Hetal Jariwala 24-Oct-12 6:05am    
use drawline function of gdi
klein_jnr 24-Oct-12 6:12am    
@jhetal i did use now i just need to create a dynamic loop to join lines of different segment thanks so i need to knw that dynamic looping if u able to help thanks

Generally you use the OnPaint or control_Paint methods to do your drawing. Then as @jhetal has suggested use the DrawLine method to draw the individual segments.
 
Share this answer
 
Are you the same person as asked C# openGL draw within a LOOP (for, while statement)[^], which I answered earlier?
 
Share this answer
 
Comments
klein_jnr 24-Oct-12 10:42am    
@richard no i am not the same the same person that did answer that question
Richard MacCutchan 24-Oct-12 10:55am    
OK, well the issue is basically the same. You iterate through all the points and draw lines between them, selecting different colours where needed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900