cocos2d-x  3.5
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Size Class Reference

#include <CCGeometry.h>

Public Member Functions

 operator Vec2 () const
 Conversion from Vec2 to Size. More...
 
Sizeoperator= (const Size &other)
Sizeoperator= (const Vec2 &point)
Size operator+ (const Size &right) const
Size operator- (const Size &right) const
Size operator* (float a) const
Size operator/ (float a) const
void setSize (float width, float height)
 Set the width and height of Size. More...
 
bool equals (const Size &target) const
 Check if two size is the same. More...
 
 Size ()
 Constructor. More...
 
 Size (float width, float height)
 Size (const Size &other)
 Size (const Vec2 &point)

Public Attributes

float width
 Width of the Size. More...
 
float height
 Height of the Size. More...
 

Static Public Attributes

static const Size ZERO
 Size(0,0). More...
 

Constructor & Destructor Documentation

Size ( )

Constructor.

Parameters
widthWidth of the size.
heightHeight of the size.
otherCopy constructor.
pointConversion from a point.
Size ( float  width,
float  height 
)
Size ( const Size other)
Size ( const Vec2 point)
explicit

Member Function Documentation

bool equals ( const Size target) const

Check if two size is the same.

operator Vec2 ( ) const
inline

Conversion from Vec2 to Size.

Size operator* ( float  a) const
Size operator+ ( const Size right) const
Size operator- ( const Size right) const
Size operator/ ( float  a) const
Size& operator= ( const Size other)
Size& operator= ( const Vec2 point)
void setSize ( float  width,
float  height 
)

Set the width and height of Size.

Member Data Documentation

float height

Height of the Size.

float width

Width of the Size.

const Size ZERO
static

Size(0,0).


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