2012-04-23 14:30:38 +08:00
|
|
|
#include "CCEGLViewProtocol.h"
|
2012-06-19 16:20:46 +08:00
|
|
|
#include "touch_dispatcher/CCTouchDispatcher.h"
|
|
|
|
#include "touch_dispatcher/CCTouch.h"
|
2012-04-23 14:30:38 +08:00
|
|
|
#include "CCDirector.h"
|
2012-06-19 16:20:46 +08:00
|
|
|
#include "cocoa/CCSet.h"
|
|
|
|
#include "cocoa/CCDictionary.h"
|
|
|
|
#include "cocoa/CCInteger.h"
|
2012-04-23 14:30:38 +08:00
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
static Touch* s_pTouches[CC_MAX_TOUCHES] = { NULL };
|
2012-04-23 14:30:38 +08:00
|
|
|
static unsigned int s_indexBitsUsed = 0;
|
2013-06-20 14:13:12 +08:00
|
|
|
static Dictionary s_TouchesIntergerDict;
|
2012-04-20 15:23:00 +08:00
|
|
|
|
|
|
|
static int getUnUsedIndex()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int temp = s_indexBitsUsed;
|
|
|
|
|
2012-04-23 14:30:38 +08:00
|
|
|
for (i = 0; i < CC_MAX_TOUCHES; i++) {
|
2012-04-20 15:23:00 +08:00
|
|
|
if (! (temp & 0x00000001)) {
|
|
|
|
s_indexBitsUsed |= (1 << i);
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
temp >>= 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// all bits are used
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void removeUsedIndexBit(int index)
|
|
|
|
{
|
2012-04-23 14:30:38 +08:00
|
|
|
if (index < 0 || index >= CC_MAX_TOUCHES)
|
2012-04-20 15:23:00 +08:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int temp = 1 << index;
|
|
|
|
temp = ~temp;
|
|
|
|
s_indexBitsUsed &= temp;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
EGLViewProtocol::EGLViewProtocol()
|
2013-06-15 14:03:30 +08:00
|
|
|
: _delegate(NULL)
|
|
|
|
, _scaleX(1.0f)
|
|
|
|
, _scaleY(1.0f)
|
|
|
|
, _resolutionPolicy(kResolutionUnKnown)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
EGLViewProtocol::~EGLViewProtocol()
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setDesignResolutionSize(float width, float height, ResolutionPolicy resolutionPolicy)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2012-08-07 14:29:46 +08:00
|
|
|
CCAssert(resolutionPolicy != kResolutionUnKnown, "should set resolutionPolicy");
|
2012-08-01 16:56:12 +08:00
|
|
|
|
2012-04-23 14:39:27 +08:00
|
|
|
if (width == 0.0f || height == 0.0f)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_designResolutionSize.setSize(width, height);
|
2012-08-01 16:56:12 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_scaleX = (float)_screenSize.width / _designResolutionSize.width;
|
|
|
|
_scaleY = (float)_screenSize.height / _designResolutionSize.height;
|
2012-08-01 16:56:12 +08:00
|
|
|
|
2012-08-20 16:32:22 +08:00
|
|
|
if (resolutionPolicy == kResolutionNoBorder)
|
2012-08-01 16:56:12 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_scaleX = _scaleY = MAX(_scaleX, _scaleY);
|
2012-08-01 16:56:12 +08:00
|
|
|
}
|
|
|
|
|
2012-08-20 16:32:22 +08:00
|
|
|
if (resolutionPolicy == kResolutionShowAll)
|
2012-08-01 16:56:12 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_scaleX = _scaleY = MIN(_scaleX, _scaleY);
|
2012-08-01 16:56:12 +08:00
|
|
|
}
|
2012-05-03 15:05:19 +08:00
|
|
|
|
2013-03-19 03:06:01 +08:00
|
|
|
if ( resolutionPolicy == kResolutionFixedHeight) {
|
2013-06-15 14:03:30 +08:00
|
|
|
_scaleX = _scaleY;
|
|
|
|
_designResolutionSize.width = ceilf(_screenSize.width/_scaleX);
|
2013-03-19 03:06:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( resolutionPolicy == kResolutionFixedWidth) {
|
2013-06-15 14:03:30 +08:00
|
|
|
_scaleY = _scaleX;
|
|
|
|
_designResolutionSize.height = ceilf(_screenSize.height/_scaleY);
|
2013-03-19 03:06:01 +08:00
|
|
|
}
|
|
|
|
|
2012-08-01 16:56:12 +08:00
|
|
|
// calculate the rect of viewport
|
2013-06-15 14:03:30 +08:00
|
|
|
float viewPortW = _designResolutionSize.width * _scaleX;
|
|
|
|
float viewPortH = _designResolutionSize.height * _scaleY;
|
2012-04-23 14:39:27 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_viewPortRect.setRect((_screenSize.width - viewPortW) / 2, (_screenSize.height - viewPortH) / 2, viewPortW, viewPortH);
|
2012-08-07 14:29:46 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_resolutionPolicy = resolutionPolicy;
|
2012-08-07 14:29:46 +08:00
|
|
|
|
2012-10-18 15:53:08 +08:00
|
|
|
// reset director's member variables to fit visible rect
|
2013-06-20 14:13:12 +08:00
|
|
|
Director::sharedDirector()->_winSizeInPoints = getDesignResolutionSize();
|
|
|
|
Director::sharedDirector()->createStatsLabel();
|
|
|
|
Director::sharedDirector()->setGLDefaultValues();
|
2012-08-07 14:29:46 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
const Size& EGLViewProtocol::getDesignResolutionSize() const
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _designResolutionSize;
|
2012-08-01 16:56:12 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
const Size& EGLViewProtocol::getFrameSize() const
|
2012-08-15 14:33:56 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _screenSize;
|
2012-08-15 14:33:56 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setFrameSize(float width, float height)
|
2012-08-07 14:29:46 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_designResolutionSize = _screenSize = CCSizeMake(width, height);
|
2012-08-07 14:29:46 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Size EGLViewProtocol::getVisibleSize() const
|
2012-08-01 16:56:12 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_resolutionPolicy == kResolutionNoBorder)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return CCSizeMake(_screenSize.width/_scaleX, _screenSize.height/_scaleY);
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
2012-08-07 14:29:46 +08:00
|
|
|
else
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _designResolutionSize;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Point EGLViewProtocol::getVisibleOrigin() const
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_resolutionPolicy == kResolutionNoBorder)
|
2012-08-07 14:29:46 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return CCPointMake((_designResolutionSize.width - _screenSize.width/_scaleX)/2,
|
|
|
|
(_designResolutionSize.height - _screenSize.height/_scaleY)/2);
|
2012-08-07 14:29:46 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
return PointZero;
|
2012-08-07 14:29:46 +08:00
|
|
|
}
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setTouchDelegate(EGLTouchDelegate * pDelegate)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_delegate = pDelegate;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setViewPortInPoints(float x , float y , float w , float h)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
glViewport((GLint)(x * _scaleX + _viewPortRect.origin.x),
|
|
|
|
(GLint)(y * _scaleY + _viewPortRect.origin.y),
|
|
|
|
(GLsizei)(w * _scaleX),
|
|
|
|
(GLsizei)(h * _scaleY));
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setScissorInPoints(float x , float y , float w , float h)
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
glScissor((GLint)(x * _scaleX + _viewPortRect.origin.x),
|
|
|
|
(GLint)(y * _scaleY + _viewPortRect.origin.y),
|
|
|
|
(GLsizei)(w * _scaleX),
|
|
|
|
(GLsizei)(h * _scaleY));
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
bool EGLViewProtocol::isScissorEnabled()
|
2013-03-29 01:28:26 +08:00
|
|
|
{
|
2013-06-07 12:50:02 +08:00
|
|
|
return (GL_FALSE == glIsEnabled(GL_SCISSOR_TEST)) ? false : true;
|
2013-03-29 01:28:26 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Rect EGLViewProtocol::getScissorRect()
|
2013-03-29 01:28:26 +08:00
|
|
|
{
|
|
|
|
GLfloat params[4];
|
|
|
|
glGetFloatv(GL_SCISSOR_BOX, params);
|
2013-06-15 14:03:30 +08:00
|
|
|
float x = (params[0] - _viewPortRect.origin.x) / _scaleX;
|
|
|
|
float y = (params[1] - _viewPortRect.origin.y) / _scaleY;
|
|
|
|
float w = params[2] / _scaleX;
|
|
|
|
float h = params[3] / _scaleY;
|
2013-03-29 01:28:26 +08:00
|
|
|
return CCRectMake(x, y, w, h);
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::setViewName(const char* pszViewName)
|
2013-03-29 15:32:30 +08:00
|
|
|
{
|
|
|
|
if (pszViewName != NULL && strlen(pszViewName) > 0)
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
strncpy(_viewName, pszViewName, sizeof(_viewName));
|
2013-03-29 15:32:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
const char* EGLViewProtocol::getViewName()
|
2013-03-29 15:32:30 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _viewName;
|
2012-09-20 01:56:58 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::handleTouchesBegin(int num, int ids[], float xs[], float ys[])
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
Set set;
|
2012-04-23 14:30:38 +08:00
|
|
|
for (int i = 0; i < num; ++i)
|
|
|
|
{
|
|
|
|
int id = ids[i];
|
|
|
|
float x = xs[i];
|
|
|
|
float y = ys[i];
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Integer* pIndex = (Integer*)s_TouchesIntergerDict.objectForKey(id);
|
2012-04-23 14:30:38 +08:00
|
|
|
int nUnusedIndex = 0;
|
|
|
|
|
|
|
|
// it is a new touch
|
|
|
|
if (pIndex == NULL)
|
|
|
|
{
|
|
|
|
nUnusedIndex = getUnUsedIndex();
|
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
// The touches is more than MAX_TOUCHES ?
|
|
|
|
if (nUnusedIndex == -1) {
|
|
|
|
CCLOG("The touches is more than MAX_TOUCHES, nUnusedIndex = %d", nUnusedIndex);
|
2012-08-20 10:38:21 +08:00
|
|
|
continue;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Touch* pTouch = s_pTouches[nUnusedIndex] = new Touch();
|
2013-06-15 14:03:30 +08:00
|
|
|
pTouch->setTouchInfo(nUnusedIndex, (x - _viewPortRect.origin.x) / _scaleX,
|
|
|
|
(y - _viewPortRect.origin.y) / _scaleY);
|
2012-08-01 18:44:10 +08:00
|
|
|
|
2012-08-29 21:50:09 +08:00
|
|
|
//CCLOG("x = %f y = %f", pTouch->getLocationInView().x, pTouch->getLocationInView().y);
|
2012-08-01 16:56:12 +08:00
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Integer* pInterObj = new Integer(nUnusedIndex);
|
2012-04-20 17:33:28 +08:00
|
|
|
s_TouchesIntergerDict.setObject(pInterObj, id);
|
2012-04-23 14:30:38 +08:00
|
|
|
set.addObject(pTouch);
|
|
|
|
pInterObj->release();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
if (set.count() == 0)
|
|
|
|
{
|
|
|
|
CCLOG("touchesBegan: count = 0");
|
2012-04-23 14:30:38 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_delegate->touchesBegan(&set, NULL);
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::handleTouchesMove(int num, int ids[], float xs[], float ys[])
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
Set set;
|
2012-04-23 14:30:38 +08:00
|
|
|
for (int i = 0; i < num; ++i)
|
|
|
|
{
|
|
|
|
int id = ids[i];
|
|
|
|
float x = xs[i];
|
2012-04-20 15:23:00 +08:00
|
|
|
float y = ys[i];
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Integer* pIndex = (Integer*)s_TouchesIntergerDict.objectForKey(id);
|
2012-04-20 15:23:00 +08:00
|
|
|
if (pIndex == NULL) {
|
|
|
|
CCLOG("if the index doesn't exist, it is an error");
|
2012-08-20 10:38:21 +08:00
|
|
|
continue;
|
2012-04-20 15:23:00 +08:00
|
|
|
}
|
|
|
|
|
2012-04-26 11:39:49 +08:00
|
|
|
CCLOGINFO("Moving touches with id: %d, x=%f, y=%f", id, x, y);
|
2013-06-20 14:13:12 +08:00
|
|
|
Touch* pTouch = s_pTouches[pIndex->getValue()];
|
2012-04-20 15:23:00 +08:00
|
|
|
if (pTouch)
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
pTouch->setTouchInfo(pIndex->getValue(), (x - _viewPortRect.origin.x) / _scaleX,
|
|
|
|
(y - _viewPortRect.origin.y) / _scaleY);
|
2012-08-01 16:56:12 +08:00
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
set.addObject(pTouch);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// It is error, should return.
|
|
|
|
CCLOG("Moving touches with id: %d error", id);
|
|
|
|
return;
|
|
|
|
}
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
if (set.count() == 0)
|
|
|
|
{
|
|
|
|
CCLOG("touchesMoved: count = 0");
|
2012-04-23 14:30:38 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_delegate->touchesMoved(&set, NULL);
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::getSetOfTouchesEndOrCancel(Set& set, int num, int ids[], float xs[], float ys[])
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
|
|
|
for (int i = 0; i < num; ++i)
|
|
|
|
{
|
|
|
|
int id = ids[i];
|
|
|
|
float x = xs[i];
|
|
|
|
float y = ys[i];
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
Integer* pIndex = (Integer*)s_TouchesIntergerDict.objectForKey(id);
|
2012-04-23 14:30:38 +08:00
|
|
|
if (pIndex == NULL)
|
|
|
|
{
|
|
|
|
CCLOG("if the index doesn't exist, it is an error");
|
2012-08-20 10:38:21 +08:00
|
|
|
continue;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
2012-04-20 15:23:00 +08:00
|
|
|
/* Add to the set to send to the director */
|
2013-06-20 14:13:12 +08:00
|
|
|
Touch* pTouch = s_pTouches[pIndex->getValue()];
|
2012-04-20 15:23:00 +08:00
|
|
|
if (pTouch)
|
|
|
|
{
|
2012-04-26 11:39:49 +08:00
|
|
|
CCLOGINFO("Ending touches with id: %d, x=%f, y=%f", id, x, y);
|
2013-06-15 14:03:30 +08:00
|
|
|
pTouch->setTouchInfo(pIndex->getValue(), (x - _viewPortRect.origin.x) / _scaleX,
|
|
|
|
(y - _viewPortRect.origin.y) / _scaleY);
|
2012-08-01 18:44:10 +08:00
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
set.addObject(pTouch);
|
|
|
|
|
|
|
|
// release the object
|
|
|
|
pTouch->release();
|
|
|
|
s_pTouches[pIndex->getValue()] = NULL;
|
|
|
|
removeUsedIndexBit(pIndex->getValue());
|
|
|
|
|
|
|
|
s_TouchesIntergerDict.removeObjectForKey(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
CCLOG("Ending touches with id: %d error", id);
|
|
|
|
return;
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-04-20 15:23:00 +08:00
|
|
|
if (set.count() == 0)
|
|
|
|
{
|
|
|
|
CCLOG("touchesEnded or touchesCancel: count = 0");
|
2012-04-23 14:30:38 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::handleTouchesEnd(int num, int ids[], float xs[], float ys[])
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
Set set;
|
2012-04-23 14:30:38 +08:00
|
|
|
getSetOfTouchesEndOrCancel(set, num, ids, xs, ys);
|
2013-06-15 14:03:30 +08:00
|
|
|
_delegate->touchesEnded(&set, NULL);
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void EGLViewProtocol::handleTouchesCancel(int num, int ids[], float xs[], float ys[])
|
2012-04-23 14:30:38 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
Set set;
|
2012-04-23 14:30:38 +08:00
|
|
|
getSetOfTouchesEndOrCancel(set, num, ids, xs, ys);
|
2013-06-15 14:03:30 +08:00
|
|
|
_delegate->touchesCancelled(&set, NULL);
|
2012-04-23 14:30:38 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
const Rect& EGLViewProtocol::getViewPortRect() const
|
2012-08-15 14:33:56 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _viewPortRect;
|
2012-08-15 14:33:56 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
float EGLViewProtocol::getScaleX() const
|
2012-08-15 14:33:56 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _scaleX;
|
2012-08-15 14:33:56 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
float EGLViewProtocol::getScaleY() const
|
2012-08-15 14:33:56 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _scaleY;
|
2012-08-15 14:33:56 +08:00
|
|
|
}
|
|
|
|
|
2012-04-23 14:30:38 +08:00
|
|
|
NS_CC_END
|