#include <Texture2dTest.h>
|
| void | onDraw (const cocos2d::Mat4 &transform, uint32_t flags) |
| |
◆ ~TextureDrawInRect()
| TextureDrawInRect::~TextureDrawInRect |
( |
| ) |
|
◆ CREATE_FUNC()
◆ draw()
| void TextureDrawInRect::draw |
( |
cocos2d::Renderer * |
renderer, |
|
|
const cocos2d::Mat4 & |
transform, |
|
|
uint32_t |
flags |
|
) |
| |
|
overridevirtual |
在文件 Texture2dTest.cpp 第 1818 行定义.
1820 TextureDemo::draw(renderer, transform, flags);
1821 onDraw(transform, flags);
void onDraw(const cocos2d::Mat4 &transform, uint32_t flags)
引用了 onDraw().
◆ onDraw()
| void TextureDrawInRect::onDraw |
( |
const cocos2d::Mat4 & |
transform, |
|
|
uint32_t |
flags |
|
) |
| |
|
protected |
在文件 Texture2dTest.cpp 第 1824 行定义.
1826 Director* director = Director::getInstance();
1827 CCASSERT(
nullptr != director,
"Director is null when setting matrix stack");
1828 director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
1829 director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, transform);
1831 auto s = Director::getInstance()->getWinSize();
1833 auto rect1 = Rect( s.width/2 - 80, 20,
_tex1->getContentSize().width * 0.5f,
_tex1->getContentSize().height *2 );
1834 auto rect2 = Rect( s.width/2 + 80, s.height/2,
_tex1->getContentSize().width * 2,
_tex1->getContentSize().height * 0.5f );
1836 _tex1->drawInRect(rect1, _globalZOrder);
1837 _Tex2F->drawInRect(rect2, _globalZOrder);
1839 director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
引用了 _tex1 , 以及 _Tex2F.
被这些函数引用 draw().
◆ onEnter()
| void TextureDrawInRect::onEnter |
( |
| ) |
|
|
overridevirtual |
◆ subtitle()
| std::string TextureDrawInRect::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string TextureDrawInRect::title |
( |
| ) |
const |
|
overridevirtual |
◆ _tex1
| cocos2d::Texture2D* TextureDrawInRect::_tex1 |
|
protected |
◆ _Tex2F
| cocos2d::Texture2D * TextureDrawInRect::_Tex2F |
|
protected |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp