Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

keep origin setting of CCImage. #48

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libfairygui/Classes/UIPackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down