Drawing on a picture

Example requests & Code samples for GdPicture Toolkits.
Post Reply
sarzan
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Drawing on a picture

Post by sarzan » Thu Nov 08, 2007 5:46 pm

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 :P

Tom Moran
Posts: 102
Joined: Thu May 24, 2007 9:41 am
Location: Phoenix, Arizona

Post by Tom Moran » Sat Nov 10, 2007 4:40 am

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

sarzan
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Post by sarzan » Mon Nov 12, 2007 12:09 pm

Tnks can be a good work around :P

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Nov 14, 2007 6:33 pm

Hi,

In the GdPicture Pro package, I've included a new visual basic application which demonstrate a way to use both Imaging & GdViewer classes to make free hand drawing.


Regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest