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 = {
254
254
var leftWidth , centerWidth , rightWidth ;
255
255
var topHeight , centerHeight , bottomHeight ;
256
256
var textureRect = spriteFrame . _rect ;
257
+ textureRect = cc . rectPointsToPixels ( textureRect ) ;
258
+ rect = cc . rectPointsToPixels ( rect ) ;
259
+ var scale = cc . contentScaleFactor ( ) ;
257
260
258
- leftWidth = insetLeft ;
259
- rightWidth = insetRight ;
261
+ leftWidth = insetLeft * scale ;
262
+ rightWidth = insetRight * scale ;
260
263
centerWidth = rect . width - leftWidth - rightWidth ;
261
- topHeight = insetTop ;
262
- bottomHeight = insetBottom ;
264
+ topHeight = insetTop * scale ;
265
+ bottomHeight = insetBottom * scale ;
263
266
centerHeight = rect . height - topHeight - bottomHeight ;
264
267
265
268
if ( uvs . length < 32 ) {
You can’t perform that action at this time.
0 commit comments