Scale9grid issue on html5

Hi there ^^
I’ve some dialog boxes whose background scales pretty bad, so in flash i used a 9scale grid to only stretch the center part of the box, here’s how it’s in flash:

The red part is the rectangle for the 9scalegrid property (it’s not exported in the game) so you can see if i’m doing something wrong.
That’s the code for the red rectangle.

_background.scale9Grid = new Rectangle(32, 28, 141, 3);

But that’s the result i’m getting once the background of the box is stretched: (the corners are streched but they shouldn’t )

Is it not supported for the html5 export ? or am i doing something wrong ? At first i thought the gradient was the cause, so i changed to an unified color but the issue is still there :frowning:.

Thanks for reading :slight_smile:

scale9Grid is not supported yet, but it would be valuable

Oh okay :confused:

Thanks for the info ! i’ll try to do it by hand then ^^.

In case it helps, here’s one way to do it.

Thank you :slight_smile:

I was trying to trace where the render code would be for (what I assume is) IBitmapData where it’s called after being set to dirty once the scale9Grid mode or other parameter is set.

Are there any high level notes/thoughts on how difficult would this be to implement for html5 target?


We have support for scale9Grid now in OpenFL :slight_smile:

Still some kinks though so take a look and see how it is working for you :slight_smile: