#include <LayerTest.h>
◆ LayerTestBlend()
| LayerTestBlend::LayerTestBlend |
( |
| ) |
|
在文件 LayerTest.cpp 第 481 行定义.
483 auto s = Director::getInstance()->getWinSize();
484 auto layer1 = LayerColor::create( Color4B(255, 255, 255, 80) );
493 sister1->setPosition( Vec2( s.width*1/3, s.height/2) );
494 sister2->setPosition( Vec2( s.width*2/3, s.height/2) );
static const char s_pathSister1[]
static const char s_pathSister2[]
引用了 kTagLayer, newBlend(), s_pathSister1 , 以及 s_pathSister2.
◆ CREATE_FUNC()
◆ newBlend()
| void LayerTestBlend::newBlend |
( |
float |
dt | ) |
|
在文件 LayerTest.cpp 第 499 行定义.
501 auto layer = (LayerColor*)getChildByTag(
kTagLayer);
503 backend::BlendFactor src;
504 backend::BlendFactor dst;
506 if( layer->getBlendFunc().dst == backend::BlendFactor::ZERO )
508 src = backend::BlendFactor::SRC_ALPHA;
509 dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA;
513 src = backend::BlendFactor::ONE_MINUS_DST_COLOR;
514 dst = backend::BlendFactor::ZERO;
517 BlendFunc bf = {src, dst};
518 layer->setBlendFunc( bf );
引用了 kTagLayer.
被这些函数引用 LayerTestBlend().
◆ subtitle()
| std::string LayerTestBlend::subtitle |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LayerTest/LayerTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp