#1156 9-slice scaling support (DefineScalingGrid)
Labels: Canvas exportFLA exportFlash ViewerSVGTags
Hi JPEXS! Hi honfika! > What steps will reproduce the problem? export as fla (i used nb 1261) and check symbol9 Cannot edit that symbol (flash prof. 13.01) And its conrners are too rounded it has less radius in origin.
PopupEarn.4b21c9e725e7.swf (24 KiB)
symbol tagged as Runtime_Button_Green_Default1
For me it looks the same... can you please attach screenshots of the wrong and the expected image? I can also edit it.
here is a better example (i have screenshot of original look) check DefineSprite31(popup.res.PopupMoreLives) you will fond 2 shapes with rounded corners in it. I attached original look in original_look.png
This is interesting... I don't have any idea why is it OK with external viewer and wrong with internal viewer.
I think it is a problem with numbers precision (rounding). FFDec uses double type values, FlashPlayer uses probably only float size. I added simple example - just zoom the second sprite with zoom buttons when "Internal player" is selected and without it. I am afraid it is hard task to change double to float...
pop.swf (1 KiB)
I found the reason... the image is not linearly scaled. There is a tag called DefineScalingGrid (check the official documentation) the borders of the image are nor scaled (only to one direction), this is how you can scale a button with preserving the corner radiuses.
9-slice scaling for bitmap exports was implemented by jpexs it needs to be implemented in svg and html5 export, too
Okay, so a) 9-slice scaling is now somehow working in our flash viewer (it's not perfect on the borderlines between slices) b) it needs to be implemented in SVG c) it needs to be implemented in HTML5 Canvas d) it needs to be implemented in FLA export (this one should be the easiest)
Title: Shape error→9-slice scaling support (DefineScalingGrid)