From 6a98a5537a65a8bddc37f1a10d0baa657087965e Mon Sep 17 00:00:00 2001 From: dmx Date: Thu, 11 Apr 2019 16:44:11 +0800 Subject: [PATCH] keep origin setting of CCImage --- libfairygui/Classes/UIPackage.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libfairygui/Classes/UIPackage.cpp b/libfairygui/Classes/UIPackage.cpp index 3d22cc9..664a7cd 100644 --- a/libfairygui/Classes/UIPackage.cpp +++ b/libfairygui/Classes/UIPackage.cpp @@ -492,17 +492,14 @@ void* UIPackage::getItemAsset(PackageItem * item) void UIPackage::loadAtlas(PackageItem * item) { Image* image = new Image(); - Image::setPNGPremultipliedAlphaEnabled(false); if (!image->initWithImageFile(item->file)) { item->texture = _emptyTexture; _emptyTexture->retain(); delete image; - Image::setPNGPremultipliedAlphaEnabled(true); CCLOGWARN("FairyGUI: texture '%s' not found in %s", item->file.c_str(), _name.c_str()); return; } - Image::setPNGPremultipliedAlphaEnabled(true); Texture2D* tex = new Texture2D(); tex->initWithImage(image);