Hello,
Is there a way to vertically flip an image? I would need to flip a number of images, but I don’t want to include a bunch of other image files to keep memory down. Does any one know of a way to do this?
Thanks,
Peter [import]uid: 38000 topic_id: 22370 reply_id: 322370[/import]
http://developer.anscamobile.com/forum/2010/10/08/cover-flow-style-look
scale(-1,1)
c
[import]uid: 24 topic_id: 22370 reply_id: 89168[/import]
Thanks Carlos! I wasn’t sure if a negative value was valid for the scale method because it wasn’t clear in the docs, but I now see that it does. Thanks! [import]uid: 38000 topic_id: 22370 reply_id: 89170[/import]
Yes, this is a perfectly valid way to flip images, horizontally or vertically. Just keep in mind that if you want to flip physics objects, this method is ripe with problems… basically, no individual object that is scaled in Corona (including this scale “flip” method) will scale its physics body properly. Only if you scale an entire display group will physics scaling work. But if you’re not using physics objects, scale and flip away until your heart’s content, it works just fine!
Brent Sorrentino
Ignis Design [import]uid: 9747 topic_id: 22370 reply_id: 89225[/import]
So then is it possible to just flip the whole “group” display group needed for storyboard? [import]uid: 38000 topic_id: 22370 reply_id: 89290[/import]
So then is it possible to just flip the whole “group” display group needed for storyboard?
You probably can, but you’ll have to test it carefully. Unlike most individual objects whose default reference points are center (in relation to the object), display groups have an upper-left reference point by default. So, if you imagine the Storyboard scene is a full screen size, “flipping” it vertically does so along an imaginary “axis” at the top edge of the screen (y=0), and thus you’ll “flip” the screen out of view (the view’s bottom edge will reside just off the top edge of the screen, but it will be flipped). In that case you’d just need to reset its position to (0,0)… or perhaps easier would be explicitly setting the view’s reference point to CenterReferencePoint and then flipping it.
Ah, reference points are so fun (mild sarcasm). Actually they’re perfectly fine in design and concept, and immensely useful, but they also cause some head scratching and confusion. 
http://developer.anscamobile.com/reference/index/objectsetreferencepoint
Brent [import]uid: 9747 topic_id: 22370 reply_id: 89316[/import]