mirror of https://github.com/axmolengine/axmol.git
fix CCScale9Sprite CapInsets bug for rotated sprite frame
This commit is contained in:
parent
d0b7b403b9
commit
3e5c62f905
|
@ -687,20 +687,10 @@ void Scale9Sprite::updateCapInset()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_spriteFrameRotated)
|
||||
{
|
||||
insets = CCRectMake(_insetBottom,
|
||||
_insetLeft,
|
||||
_spriteRect.size.width-_insetRight-_insetLeft,
|
||||
_spriteRect.size.height-_insetTop-_insetBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
insets = CCRectMake(_insetLeft,
|
||||
_insetTop,
|
||||
_spriteRect.size.width-_insetLeft-_insetRight,
|
||||
_spriteRect.size.height-_insetTop-_insetBottom);
|
||||
}
|
||||
insets = CCRectMake(_insetLeft,
|
||||
_insetTop,
|
||||
_spriteRect.size.width-_insetLeft-_insetRight,
|
||||
_spriteRect.size.height-_insetTop-_insetBottom);
|
||||
}
|
||||
this->setCapInsets(insets);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue