File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
extensions/ccui/base-classes Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,15 @@ var scale9QuadGenerator = {
254254 var leftWidth , centerWidth , rightWidth ;
255255 var topHeight , centerHeight , bottomHeight ;
256256 var textureRect = spriteFrame . _rect ;
257+ textureRect = cc . rectPointsToPixels ( textureRect ) ;
258+ rect = cc . rectPointsToPixels ( rect ) ;
259+ var scale = cc . contentScaleFactor ( ) ;
257260
258- leftWidth = insetLeft ;
259- rightWidth = insetRight ;
261+ leftWidth = insetLeft * scale ;
262+ rightWidth = insetRight * scale ;
260263 centerWidth = rect . width - leftWidth - rightWidth ;
261- topHeight = insetTop ;
262- bottomHeight = insetBottom ;
264+ topHeight = insetTop * scale ;
265+ bottomHeight = insetBottom * scale ;
263266 centerHeight = rect . height - topHeight - bottomHeight ;
264267
265268 if ( uvs . length < 32 ) {
You can’t perform that action at this time.
0 commit comments