How to 'bookmark' parts of an image

Example requests & Code samples for GdPicture Toolkits.
Post Reply
john
Posts: 1
Joined: Wed Feb 06, 2008 1:16 pm

How to 'bookmark' parts of an image

Post by john » Wed Feb 06, 2008 1:39 pm

Is there a way to save current view of an image without saving it as a new file?

example:
Load a digitized floor plan of a house.
Zoom to living room section of the drawing.
Save the current view into a 'bookmark'.
Close the image.
Want to reload the original floor plan w/saved living room view showing.

john

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

Re: How to 'bookmark' parts of an image

Post by Loïc » Fri Feb 08, 2008 11:54 am

Hi John,

You can save the displayed image area like that:

Code: Select all

Dim nLeft As Long, nTop As Long, nWidth As Long, nHeight As Long
Call GdViewer1.GetDisplayedArea(nLeft, nTop, nWidth, nHeight)

Then, you can reload this same area using this code:

Code: Select all

Call oGdViewer.SetRectValues(nLeft, nTop, nWidth, nHeight)
GdViewer1.ZoomRect
GdViewer1.ClearRect

Regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest