cc_extra.h: allign method paintImage() and update comments

This commit is contained in:
2018-01-02 22:26:53 +01:00
parent 935efd0348
commit 57b75d0601
2 changed files with 9 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ bool paintTextBoxRel( const string& text,
return box.isPainted();
}
bool paintImage( const std::string& image_name,
bool paintImage( const std::string& Image,
const int& x,
const int& y,
const int& dx,
@@ -114,7 +114,8 @@ bool paintImage( const std::string& image_name,
int shadow_mode,
const fb_pixel_t& color_shadow)
{
CComponentsPicture box( x, y, dx, dy, image_name, NULL, shadow_mode, color_frame, color_body, color_shadow, transparent);
std::string image = (dx > 0 || dy > 0) ? CFrameBuffer::getInstance()->getIconPath(Image) : Image;
CComponentsPicture box( x, y, dx, dy, image, NULL, shadow_mode, color_frame, color_body, color_shadow, transparent);
box.doPaintBg(color_body !=0);
box.setCorner(radius, corner_type);
box.paint(CC_SAVE_SCREEN_NO);