Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
RichElementImage Class Reference

Rich element for displaying images. More...

Inherits RichElement.

Public Member Functions

 RichElementImage ()
 Default constructor.
 
virtual ~RichElementImage ()
 Default destructor.
 
bool init (int tag, const Color3B &color, GLubyte opacity, const std::string &filePath, const std::string &url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL)
 Initialize a RichElementImage with various arguments. More...
 
var init ( var tag, var color, var opacity, var filePath, var LOCAL)
 Initialize a RichElementImage with various arguments. More...
 
local init ( local tag, local color, local opacity, local filePath, local LOCAL)
 Initialize a RichElementImage with various arguments. More...
 
- Public Member Functions inherited from RichElement
 RichElement ()
 Default constructor.
 
 ctor ()
 Default constructor.
 
 new ()
 Default constructor.
 
virtual ~RichElement ()
 Default destructor.
 
bool init (int tag, const Color3B &color, GLubyte opacity)
 Initialize a rich element with different arguments. More...
 
var init ( var tag, var color, var opacity)
 Initialize a rich element with different arguments. More...
 
local init ( local tag, local color, local opacity)
 Initialize a rich element with different arguments. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
local release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Static Public Member Functions

static RichElementImagecreate (int tag, const Color3B &color, GLubyte opacity, const std::string &filePath, const std::string &url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL)
 Create a RichElementImage with various arguments. More...
 

Additional Inherited Members

- Public Types inherited from RichElement
enum  Type { TEXT, IMAGE, CUSTOM, NEWLINE }
 Rich element type. More...
 
- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

Rich element for displaying images.

Member Function Documentation

bool init ( int  tag,
const Color3B color,
GLubyte  opacity,
const std::string &  filePath,
const std::string &  url = "",
Widget::TextureResType  texType = Widget::TextureResType::LOCAL 
)

Initialize a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
True if initialize success, false otherwise.
var init ( var  tag,
var  color,
var  opacity,
var  filePath,
var  url = "",
var  texType = Widget::TextureResType::LOCAL 
)

Initialize a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
True if initialize success, false otherwise.
local init ( local  tag,
local  color,
local  opacity,
local  filePath,
local  url = "",
local  texType = Widget::TextureResType::LOCAL 
)

Initialize a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
True if initialize success, false otherwise.
static RichElementImage* create ( int  tag,
const Color3B color,
GLubyte  opacity,
const std::string &  filePath,
const std::string &  url = "",
Widget::TextureResType  texType = Widget::TextureResType::LOCAL 
)
static

Create a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
A RichElementImage instance.
var create ( var  tag,
var  color,
var  opacity,
var  filePath,
var  url = "",
var  texType = Widget::TextureResType::LOCAL 
)
static

Create a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
A RichElementImage instance.
local create ( local  tag,
local  color,
local  opacity,
local  filePath,
local  url = "",
local  texType = Widget::TextureResType::LOCAL 
)
static

Create a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
Returns
A RichElementImage instance.

The documentation for this class was generated from the following file: