fix ninepatchdrawable,allways fallinto mirror drawings

This commit is contained in:
houzh 2022-02-12 09:42:34 +00:00
parent e58f55684e
commit 08106e7a92

View File

@ -214,7 +214,7 @@ std::shared_ptr<Drawable::ConstantState>NinePatchDrawable::getConstantState(){
void NinePatchDrawable::draw(Canvas&canvas){
if(mNinePatchState->mNinePatch){
canvas.save();
if(needsMirroring()||1){
if(needsMirroring()){
const float cx=mBounds.left+mBounds.width/2.f;
const float cy=mBounds.left+mBounds.height/2.f;
canvas.scale(-1.f,1.f);