Clipping / Masking

Hi,

I looked through the doc to see if it was available, but it’s not (correct me I’m wrong). It’d be nice to have some clipping functions, like a mask in flash.

Basically something like this :

[code]local clip_rect = display.newClipRect(50, 50, 100, 100);

local circle = display.newCircle(60, 60, 80);
circle:setClip(clip_rect);
[/code]

A polygon shape could be *very* helpful in this case. I don’t know how hard it’d be to add this feature into Corona, especially using OpenGL. There’s glScissor but it’s only for static rectangle (can’t be rotated from what I know).

Tom [import]uid: 4566 topic_id: 429 reply_id: 300429[/import]

I want this too! Already wondered why that is not implemented yet…

How can one scroll something inside a rect on screen!? Or do I miss something? [import]uid: 6928 topic_id: 429 reply_id: 3310[/import]

I third that. Clipping masks would be great.

This is no substitute for such, but in some cases it could be handy: a way to scroll an image within an arbitrary window.

WindowScroller

NOTE: requires game SDK as it uses spritesheets. [import]uid: 3953 topic_id: 429 reply_id: 5435[/import]

i fourth that.

i’ve seen amazing things made with masks in Flash. without even writing a single line of code. well, Flash has an IDE and lets you designate a layer as a mask layer. but a property like displayObject.mask=anotherDisplayObject would be great to have.

[import]uid: 6459 topic_id: 429 reply_id: 5566[/import]

also suggested here… http://developer.anscamobile.com/forum/2010/10/05/mask-capture-image

apparently something like that is coming… :slight_smile:
[import]uid: 6645 topic_id: 429 reply_id: 8724[/import]

This would be great. Using it for simple things like energy bars would be a big help. I’m sure others could use it for more. [import]uid: 10484 topic_id: 429 reply_id: 8934[/import]

Any news on masking? [import]uid: 4589 topic_id: 429 reply_id: 9266[/import]

Any news on masking?, thanks

http://developer.anscamobile.com/forum/2010/11/15/magnifying-glass [import]uid: 8970 topic_id: 429 reply_id: 11125[/import]