Hi Richmond,

RM wrote
> Am I being stupid?

No, this same topic (masking images) have been discussed many times before. 
An this same topic will arise again in a near future. Do you know why?

Because LC IDE does not have an integrated menu or an external palette or a
stack plug-in to create mask for images.

2011 in the forums:
http://forums.livecode.com/viewtopic.php?f=10&t=6525
2013 in the mail list:
http://lists.runrev.com/pipermail/use-livecode/2013-October/subject.html#193880

By the way, just to complete in this same thread all masking options
available, here is a recipe for using Scott Rossi's Hidden Point technique
to mask an image:
http://runtime-revolution.278305.n4.nabble.com/Hidden-point-technique-to-mask-an-image-td2270248.html

A graphic with discontiguous points is just another way to create a vector
mask.

1) Create a new stack
2) Create a polygon graphic
and set the points of it to:

0,0

34,268
224,268
127,365
34,268

3) import an image into this stack,
put the image in a corner, where it does not
hide the graphic and:

set the backpattern of grc 1 to the id of img 1

(now, the imported image is cropped within
the graphic)

4) set the script of the graphic to this variation
of Scott Rossi script to move the first point of
the graphic and (at the same time) move the
image within the graphic:

local lpoints,tClick,tFirstPoint
-- based on Scott Rossi script for masking images

on mouseDown
   put mouseH(),mouseV() into tClick
   put the points of me into lpoints
   put line 1 of lpoints into tFirstPoint
   put "mouseDown" & cr & lpoints & cr & cr into fld 1 
end mouseDown

on mouseMove X,Y
   if tClick = "" then exit mouseMove
   put  (X - item 1 of tClick,Y - item 2 of tClick)
   put  (X - item 1 of tClick) + item 1 of tFirstPoint,(Y - item 2 of
tClick) + item 2 of tFirstPoint into line 1 of lpoints
   set the points of me to lpoints
end mouseMove

on mouseUp
   put "" into tClick
end mouseUp

on mouseRelease
   put "" into tClick
end mouseRelease

When you click inside the graphic and move the mouse
the image will move within the graphic.

Alejandro




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Design-Challenge-Round-Corner-mask-on-images-tp4702659p4702879.html
Sent from the Revolution - User mailing list archive at Nabble.com.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to