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
|
@ -686,22 +686,12 @@ void Scale9Sprite::updateCapInset()
|
|||
insets = RectZero;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
this->setCapInsets(insets);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue