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
|
else
|
||||||
{
|
{
|
||||||
if (_spriteFrameRotated)
|
insets = CCRectMake(_insetLeft,
|
||||||
{
|
_insetTop,
|
||||||
insets = CCRectMake(_insetBottom,
|
_spriteRect.size.width-_insetLeft-_insetRight,
|
||||||
_insetLeft,
|
_spriteRect.size.height-_insetTop-_insetBottom);
|
||||||
_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);
|
this->setCapInsets(insets);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue