Would like to show a photo through a polygon shape

Paul Hibbert paulhibbert at mac.com
Sun Oct 20 16:38:43 EDT 2013


Hi Roger,

Another method, if the image is the correct size to suit the polygon (or can be adjusted to fit) you can also…

 set the backgroundPattern of grc "myPolygon" to the ID of image "myImage"

You have less control over the location of the image within the polygon, it's just aligned with the topLeft so if you need to control the location Mark's suggestion may work out better, of course if the image is smaller than the polygon it will just repeat.

Paul


On 2013-10-20, at 1:19 PM, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:

> Hi Roger,
> 
> Fill the polygon, export to PNG, set the text of an image object to the PNG, take the alpha mask from the image object and set the alpha mask of the image object containing your photo to it.
> 
> --
> Best regards,
> 
> Mark Schonewille
> 
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
> 
> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com
> 
> Buy my new book "Programming LiveCode for the Real Beginner" http://qery.us/3fi
> 
> Fill out this survey please
> http://livecodebeginner.economy-x-talk.com/survey/
> 
> On 10/20/2013 22:03, Roger Eller wrote:
>> How might I put a picture into a triangle shape with the points:
>> 
>> 34,268
>> 
>> 224,268
>> 
>> 127,365
>> 
>> 34,268
>> 
>> If it were for one time use, I'd just use gimp or photoshop.  This will be
>> a picture that was just taken, or chosen from the library.
>> 
>> ~Roger
> 
> 
> _______________________________________________
> 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