Custom control performance with a backgroundPattern

Scott Rossi scott at tactilemedia.com
Thu Apr 14 05:30:17 EDT 2011


Hi Anthony:

Haven't checked it recently but there was threshold on the size of images
used for backPatterns -- I think it was around 128px or 256px.  Larger
images would work, but as you saw, performance is poor and artifacts will
often appear whenever you move something around.  Usually you'll use a
backPattern because you want the image/texture to tile over a large region.

Using large images is fine, and your application of the image to a button as
an icon will work.  But don't forget that any group can be used as a
background for multiple cards, and you can group single objects.  So if you
want an image to appear on several cards, you can group the image and place
the resulting group on any card without duplicating the data of the image.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


Recently, Anthony Howe wrote:

> Hiya Gang,
> 
> scenario:
> 
> stack at 1024 x 768 with a number of cards.
> 
> cards contain a number of custom controls for user. (multimedia app)
> 
> when using a 1024 x 768 imported background image file (around 800k...
> pre-optimised) as the 'backgroundPattern' for the stack / card, all the custom
> controls are sluggish at best, sometimes, disfunctional.
> 
> when using the SAME image simply placed on the card in question at layer 1 or
> 'back' everything works fine.
> 
> Current workaround is to insert the background image as the image of a BUTTON
> into the global nav grp that I have, which simply gets displayed on each
> required screen, without creating multiple instances of the large background
> image data.
> 
> The problem does NOT occur when SMALLER graphics are loaded as the
> backgroundPattern on the card / stack.
> 
> Also had the alwaysbuffer set to true of the image...
> 
> I'm guessing there's some weird memory management stuff going on with teh
> BackgroundPattern function and the larger file?
> 
> Thoughts?
> 
> 
> _______________________________________________
> 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