Oval framed photo

David Bovill david at scimatch.org
Sat May 11 08:13:20 EDT 2013


Thanks Mike and Roger - seems like it works on OSX at least despite the
notes in the docs:

To be used as a pattern on Mac OS systems, an image must be 128x128 pixels
> or less, and both its height and width must be a power of 2, however, in
> LiveCode version 2.7, this restriction was partially lifted and the engine
> will tile rectangular regions correctly with arbitrarily sized background
> patterns.To be used on Windows and Unix systems, height and width must be
> divisible by 8. To be used as a fully cross-platform pattern, both an
> image's dimensions should be one of 8, 16, 32, 64, or 128.
>

However it works nicely on OSX now. I'm keeping the technique below as it
allows me to reposition the image within the oval by dragging it around -
but then when I want to keep it I will export the snapshot and then set the
backgroundpattern of the graphic.

By the way I can't get the new syntax to work:


   1.
>
>    New variants of the import snapshot and export snapshot commands have
>    been added: import snapshot ... at size width, height
>    export snapshot ... at size width, height
>

 The script editor does not like the syntax?




On 10 May 2013 13:14, Roger Guay <irog at mac.com> wrote:

> Hi David,
>
> Seems to me that the ideal solution to you problem is to make the image
> the backgroundPattern of your oval.
>
> Roger
>
>
> On May 10, 2013, at 4:22 AM, David Bovill <david at scimatch.org> wrote:
>
> > OK - seems like this works:
> >
> >   - Image at back using ink "blendSrcAtop"
> >   - Graphic in front, black filled oval, with ink "blendSrcOver"
> >   - Group both objects and set the ink of the group to "blendSrcOver"
> >
> > Or use the following scripts:
> >
> > getprop show_Rounded
> >>   put the ink of me into someInk
> >>   if someInk is "blendSrcOver" then
> >>      return true
> >>   else
> >>      return false
> >>   end if
> >> end show_Rounded
> >>
> >> setprop show_Rounded someBoolean
> >>   put the graphic_Object of me into roundedGraphic
> >>   put the image_Object of me into imageObject
> >>   set the ink of imageObject to "blendSrcAtop"
> >>
> >>   if someBoolean is true then
> >>      set the ink of me to "blendSrcOver"
> >>      set the ink of roundedGraphic to "blendSrcOver"
> >>   else
> >>      set the ink of me to "srcCopy"
> >>      set the ink of roundedGraphic to "srcCopy"
> >>   end if
> >> end show_Rounded
> >>
> >
> > On 10 May 2013 11:59, David Bovill <david at scimatch.org> wrote:
> >
> >> Trying to work out the right combination of blends for an image (photo)
> >> and a graphic oval to create an oval mask. Ideally this is a group so
> that
> >> I can change the image and not something which depends on an alpha
> channel.
> >>
> >> Getting close - but nothing quite right yet. Suggestions?
> >>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list