RichElementImage* RichElementImage::create(int tag, const Color3B &color, GLubyte opacity, const char *filePath) { RichElementImage* element = new RichElementImage(); if (element && element->init(tag, color, opacity, filePath)) { element->autorelease(); return element; } CC_SAFE_DELETE(element); return NULL; }
RichElementImage* RichElementImage::create(int tag, const Color3B &color, GLubyte opacity, const std::string& filePath) { RichElementImage* element = new (std::nothrow) RichElementImage(); if (element && element->init(tag, color, opacity, filePath)) { element->autorelease(); return element; } CC_SAFE_DELETE(element); return nullptr; }
RichElementImage* RichElementImage::create(const std::string& filePath,const char* data) { RichElementImage* element = new (std::nothrow) RichElementImage(); if (element && element->init( filePath,data)) { element->autorelease(); return element; } CC_SAFE_DELETE(element); return nullptr; }