Hello guruz
i have an image , i want to select particullar area of image by pen or bursh and want to save it with erease functionality.
any idea clue , how to do that
regards
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
FroglegPosted Jan 8, 2011, 3:37 PM
nizamani nizamaniPosted Jan 8, 2011, 4:38 AM
till yet with your help , map can be saved now with area selected by me , i am trying to add some text on it now .
i need more help from you, i have attached the updated work , just review it .
kindly help me regarding following topics
1. Prevent to Overwrite/ Overdraw on already selected lines
(for this either on paint event i should take array which hold positions of already drawn lines and on mouse / paint / event i should check that either lines are already drawn .)
2. Erase lines / selection
3. enlarge particullar selection
best Regards
FroglegPosted Jan 8, 2011, 2:15 AM
To do this you could use serialization
http://blog.csharphelper.com/2010/12/17/use-xml-serialization-to-save-and-restore-pictures-drawn-by-the-user-in-c.aspx
To enlarge you could copy a rectangle slightly bigger than your polygon into a picturebox that has sizemode set to stretched
To delete or edit unsure till I get further information
Tackle one part at a time -ie: Do the saving polygons first, then upload your project so we can work out a way to edit
nizamani nizamaniPosted Jan 8, 2011, 1:44 AM
1.how can i edit (enlarge , particular sketched area , delete ).
2. I need to save what ever i draw on picture box so for doing that i did this
private void button1_Click(object sender, EventArgs e)
{
Control.ControlCollection coll = this.Controls;
foreach (Control c in coll)
{
if (c != null)
MessageBox.Show("ControlName"+c.Name.ToString()+" - Location X ="+c.Location.X.ToString()+"Location Y="+c.Location.Y.ToString());
}
}
above code does not recognize polygons as control object. as i need to save the location and with their object name ..how can i do that.?
Regards
FroglegPosted Jan 8, 2011, 12:17 AM
http://blog.csharphelper.com/2010/06/11/let-the-user-draw-polygons-in-c.aspx
nizamani nizamaniPosted Jan 7, 2011, 11:58 PM
exmaple : http://wikimapia.org/#lat=24.8667&lon=67.05&z=10&l=0&m=b
open this link you find a map with option of "Add place" option
wikimapia highlight area of map and we can save it . Excalty in that way i have a picture box contain map in background i want to select any area using floating line (as it is in viki mapia) and wants to save and rease it .
any idea how to do that
FroglegPosted Jan 7, 2011, 5:09 PM