mask question and possible bug

I am not sure if I am using the mask feature correctly so this may just be operator error, but it appears to me that there is a bug when you scale the image that the mask was set for.

I have a 720x720 image. I have a 724x724 mask.

The mask gets positioned at -4, -4 to account for the 4 pixel black border that is required per the docs.

I draw my image at 0,0.

Everything looks fine.

I then set the scale on the image to 2, 2

The image *should* be clipped to the 720x720 interior of the mask, but is not. After some playing around it appears that the scale factor of the image gets applied to the mask. So to address this (bug), I change the scale factor of the mask to be 0.5, 0.5.

Now, instead of seeing my 2x image clipped to the 720x720 rectangle, I get the image clipped in a upside down L shape. It's almost as if the mask got moved to the center of the image, even though I explicitly set the reference point for the image to TopLeftReferencePoint.

I'm just trying to have a FIXED mask over my background for the game area, then resize the "play area" without it spilling over onto the backgound. SOmething like this:

BBBBBBBBBBBB
BBPPPPPBBBBB
BBPPPPPBBBBB
BBPPPPPBBBBB
BBBBBBBBBBBB

Where B is the full screen background, and P is the play area.

When I scale P to double the size (let's call that D) I get this if I don't cut the mask in half:

BBBBBBBBBBBB
BBDDDDDDDDDD
BBDDDDDDDDDD
BBDDDDDDDDDD
BBDDDDDDDDDD

However, if I scale the mask down to account for the apparent scaling up due to the image being twice as large I see:

BBBBBBBBBBBB
BBBBBBBBBBBB
BBBBBBBBBBBB
BBBBBBBDDDDD
BBBBBBBDDDDD

Please note that in this last example, the doubled image is NOT offset (meaning I don't see the upper left corner of the image data), just the mask appears to be offset.

I then took the Flashlite sample, and changed it so when I tap the screen the background toggles between 1x and 2x its original scale. You can see a similar thing happening, but because the mask is round it doesn't give exactly the same effect.

As with all my other posts, I can put up a sample. So far NONE of the bugs I have entered in the bug database have been responded to, so it appears all of these posts and my bug reports are going into a black hole.

So... Is this a known bug or what am I doing wrong?

Thanks,

Ken

views:1450 update:2011/12/1 20:56:45
corona forums © 2003-2011