I am trying to create what, in other languages, is often called a viewport. That is, I have a large image, but I want to show only a small rectangular part of it. I don't want to create a huge mask to cover the rest of the image, as that blocks out lots of other objects on the card. I want to be able to (somehow) define just the small rectangle that lets that part of the larger object show through.
I had assumed this can be done with some choice of Blends and transparency, but I have tried many combinations and cannot create a viewport effect. I can always block what's under the small rectangle, but I cannot "allow through" what's under the small rectangle.
Any suggestions?
viewport
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
viewport
Steve Alessi
Associate Professor
The University of Iowa
Associate Professor
The University of Iowa
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: viewport
Put the image object in a group control.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: viewport
Thanks, Richard! That worked. I learned that I also need to "lock" the location of the group, or it changes along with changes to the images location.
Steve
Steve
Steve Alessi
Associate Professor
The University of Iowa
Associate Professor
The University of Iowa
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: viewport
Glad that was helpful. Yes, locking the interior objects can help in a good many uses of groups.
You may also want to explore the boundingRect property for groups. You won't need it all the time, but if you want to have multiple objects in a group which has a scrolling area larger than their collective bounds, the boundingRect will let you define the effective area of the group so you can do some nice canvas-like things with them.
You may also want to explore the boundingRect property for groups. You won't need it all the time, but if you want to have multiple objects in a group which has a scrolling area larger than their collective bounds, the boundingRect will let you define the effective area of the group so you can do some nice canvas-like things with them.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn