how can i create the 9 grid control in corona?
[import]uid: 29364 topic_id: 9069 reply_id: 309069[/import]
i know what a grid control is. but “the 9 grid control” i need additional info
c. [import]uid: 24 topic_id: 9069 reply_id: 33164[/import]
yes, can you give me a grid control of lua code? [import]uid: 29364 topic_id: 9069 reply_id: 36419[/import]
He probably means Grid 9 Scaling, which enables you to easily scale an image while preserving the scale of certain portions of the image based where it lies within a specified grid:
(just a guess)
[import]uid: 10504 topic_id: 9069 reply_id: 36436[/import]
That feature is available in adobe fireworks, think photoshop has it too. [import]uid: 13560 topic_id: 9069 reply_id: 36442[/import]
thank for your help [import]uid: 29364 topic_id: 9069 reply_id: 36720[/import]
@qianlima210210,
what are you after a Grid Control for Corona, like windows Phone7 tiles or a scalable button that is described in the link above?
cheers,
? [import]uid: 3826 topic_id: 9069 reply_id: 36730[/import]
Well, Grid 9 Scaling for images would indeed be very useful, because we would be able to create custom UI stuff like scaleable windows, menus, buttons, tooltips, backgrounds etc. then providing a single image only. This image could be scaled to any size without distortion.
Imagine you want to use a paper scroll as a background image for a text in your app. You can’t scale this paper graphic to any width or height because it will soon look “squished”. You can prevent this by using Grid 9 Scaling, the graphic looks nice then no matter what width or height you scale it to.
Here’s another good explanation, by the way:
> Controlling distortion when scaling [import]uid: 10504 topic_id: 9069 reply_id: 36761[/import]
You can do it today by exporting your image as slices, wrapping it in a group and then applying some logic about resizing but it’s not nearly as convenient.
In Android there is a 9 patch tool that let’s you define what parts stretch and what parts don’t. When you use one of those graphics the system automatically does the ‘right thing’ which is very convenient.
It would really be very nice to add built in support in Corona for this [import]uid: 48162 topic_id: 9069 reply_id: 36846[/import]
+1, very nice feature. [import]uid: 12088 topic_id: 9069 reply_id: 36922[/import]
For those that really really want this control, have a look here, this is OZ App’s implementation of the Grid9 in CoronaSDK.
http://iphone.oz-apps.com/a-grid9-control
cheers,
? [import]uid: 3826 topic_id: 9069 reply_id: 37075[/import]