• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

any other way of removing or moving the shapes drawn on the image of picture box

thippu

Member
Joined
Mar 6, 2019
Messages
14
Location
Bangalore
Programming Experience
Beginner
Hi,
1.I have picture box and loaded a image to it.
2.when a user draws a shape on the picture box I will store coordinates of the shape and drawn on the loaded image.
3. Now I have updated the project with moving shapes feature on picture box and when user moves the shapes of the picture box image , I know the translated coordinates and original shape coordinates how to remove the original shape of the image of the picture box and draw translated shape(moved shape) easily.
4. I'm thinking like updating the old shape coordinates with the new coordinates and redrawing all the shapes of the image of the picture box, there are any out of box function in c# to do this?
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
2,166
Location
Sydney, Australia
Programming Experience
10+
What you're asking for is not possible. If you draw on an Image then that's permanent. Just draw on the control instead, which is not permanent. Anything you draw on the control had to be redrawn on every Paint event so, to change what's drawn, you simply change the data that controls the drawing and then force a repaint. You can do that as many times as you like and then, if you need to make it permanent some time, draw on the Image then. Check out this simple example.
 

thippu

Member
Joined
Mar 6, 2019
Messages
14
Location
Bangalore
Programming Experience
Beginner
Thanks for the reply. I want permanent for some time, I will go through the link.
 
Top Bottom