Drawing on a picture
Drawing on a picture
I have to add the free hand drawing capability to my app.
My first try is using gdViewer but, obiuvsly, i realize that is not in the scope of the object and it haven't drawing method.
Then i focus my try on Imaging object. There is a couple of nice drawing method to use.
Ok but how link the 2 thing ? I need to trap the mouse move event on the gdviewer and then draw on the relative image ... then refresh the gdViewer ? mmm...
I want an immediate feedback for the user... like any other paint program.
Someone have an idea ?
Tnks
My first try is using gdViewer but, obiuvsly, i realize that is not in the scope of the object and it haven't drawing method.
Then i focus my try on Imaging object. There is a couple of nice drawing method to use.
Ok but how link the 2 thing ? I need to trap the mouse move event on the gdviewer and then draw on the relative image ... then refresh the gdViewer ? mmm...
I want an immediate feedback for the user... like any other paint program.
Someone have an idea ?
Tnks
Hi Sarzen:
Perhaps Loic has a better method... but the first thing that occurs to me is to use a standard picture box.
1. Use the GdPicture GetPicture to copy the image to StdPicture object.
2. Size the picture object and display on top of the gdviewer in the same exact location as the picture in the viewer.
3. Use the built in line, circle drawing methods of the stdpicture object.
4. When finished copy the picture back into Imaging object and then to gdviewer and remove stdpicture object.
Tom
Perhaps Loic has a better method... but the first thing that occurs to me is to use a standard picture box.
1. Use the GdPicture GetPicture to copy the image to StdPicture object.
2. Size the picture object and display on top of the gdviewer in the same exact location as the picture in the viewer.
3. Use the built in line, circle drawing methods of the stdpicture object.
4. When finished copy the picture back into Imaging object and then to gdviewer and remove stdpicture object.
Tom
Who is online
Users browsing this forum: No registered users and 1 guest