PuzzleSDK
TextureConvertAI88类 参考

#include <Texture2dTest.h>

+ 类 TextureConvertAI88 继承关系图:
+ TextureConvertAI88 的协作图:

Public 成员函数

 CREATE_FUNC (TextureConvertAI88)
 
virtual void onEnter () override
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 TextureDemo
virtual ~TextureDemo ()
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 Texture2dTest.h633 行定义.

成员函数说明

◆ CREATE_FUNC()

TextureConvertAI88::CREATE_FUNC ( TextureConvertAI88  )

◆ onEnter()

void TextureConvertAI88::onEnter ( )
overridevirtual

重载 TextureDemo .

在文件 Texture2dTest.cpp2297 行定义.

2298{
2300
2301 auto s = Director::getInstance()->getWinSize();
2302
2303 auto background = LayerColor::create(Color4B(255,0,0,255), s.width, s.height);
2304 addChild(background, -1);
2305
2306 const char* img = "Images/test_image_ai88.png";
2307 addImageToDemo(*this, 1*s.width/9, s.height/2+32, img, backend::PixelFormat::RGBA8888);
2308 addImageToDemo(*this, 2*s.width/9, s.height/2-32, img, backend::PixelFormat::RGB888);
2309 addImageToDemo(*this, 3*s.width/9, s.height/2+32, img, backend::PixelFormat::RGB565);
2310 addImageToDemo(*this, 4*s.width/9, s.height/2-32, img, backend::PixelFormat::A8);
2311 addImageToDemo(*this, 5*s.width/9, s.height/2+32, img, backend::PixelFormat::I8);
2312 addImageToDemo(*this, 6*s.width/9, s.height/2-32, img, backend::PixelFormat::AI88);
2313 addImageToDemo(*this, 7*s.width/9, s.height/2+32, img, backend::PixelFormat::RGBA4444);
2314 addImageToDemo(*this, 8*s.width/9, s.height/2-32, img, backend::PixelFormat::RGB5A1);
2315
2316 // restore default
2317 Texture2D::setDefaultAlphaPixelFormat(backend::PixelFormat::DEFAULT);
2318 log("%s\n", Director::getInstance()->getTextureCache()->getCachedTextureInfo().c_str());
2319}
static void addImageToDemo(TextureDemo &demo, float x, float y, const char *path, backend::PixelFormat format)
virtual void onEnter() override

引用了 addImageToDemo() , 以及 TextureDemo::onEnter().

+ 函数调用图:

◆ subtitle()

std::string TextureConvertAI88::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 Texture2dTest.cpp2326 行定义.

2327{
2328 return "RGBA8888,RGB888,RGB565,A8,I8,AI88,RGBA4444,RGB5A1";
2329}

◆ title()

std::string TextureConvertAI88::title ( ) const
overridevirtual

重载 TestCase .

在文件 Texture2dTest.cpp2321 行定义.

2322{
2323 return "AI88 convert test";
2324}

该类的文档由以下文件生成: