Image Mapping program

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Image Mapping program

Post by magice » Thu Mar 26, 2009 9:19 pm

I am working on a specialized image mapping program. I have no experience working on any programs that deal with image files. I need the end user to be able to load an image into a specific area of the window for specifying areas to be mapped. None of the fields seem to be able to hold an image file, so I have begun experimenting with using a substack. Is there any way to lock a substack to the primary as if it were a field?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Thu Mar 26, 2009 9:49 pm

How about using an image control, placed on layer 1 in your card; and then set its filename property to the path to the image.

Code: Select all

on mouseUp
  answer file "Please select an image file"
  if the result is "Cancel" then exit mouseUp
  set the filename of image "ImageToMap" to it
end mouseUp
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Post by magice » Thu Mar 26, 2009 10:27 pm

that is pretty much what I have been trying. The problem is, if the image is as large as the entire stack, it fills more then my designated image area. Locking the size and position of the image causes all imported images to get stretched to the size and aspect ratio of the image area. I assume that that meant that the image control wasn't so much a field, but instead the image itself and the stack is the field. What I need is a specified area, and if the image is larger then that area i need scroll bars. If the image is smaller, I need it to lock to the upper left corner of the area. I was hoping there was an easy way to do this.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Post by magice » Thu Mar 26, 2009 11:25 pm

I think I got it, ...I put the image area into a group by itself. Then under the group property manager i added scroll bars and locked size and position.
This program never ceases to impress me.

Post Reply