课程表

入门与环境搭建

简单控件的使用

视图控制

调用、存储、网络和动画

其他控件的使用

工具箱
速查手册

图像渲染

当前位置:免费教程 » 移动开发 » CrossApp

类说明

图像渲染


CARenderImage 方法

方法说明
visit访问
draw显示
create创建,指定Format和DepthStencilFormat
create创建,指定Format
create创建
initWithWidthAndHeight初始化指定格Format
initWithWidthAndHeight初始化指定格Format和DepthStencilFormat
printscreenWithView截图并指定view
printscreenWithView截图并指定view和offset
printscreenWithView截图并指定view和backgroundColor
printscreenWithView截图并指定view、offset和backgroundColor
clear清除背景颜色
clearDepth清除depthValue
clearStencil清除Stencil
saveToFile保存到文件
listenToBackground监听背景
listenToForeground监听前景
getClearFlags获取清除的标志
setClearFlags设置清除的标志
getClearColor获取清除的颜色
setClearColor设置清除的颜色
getClearDepth获取清除的深度
setClearDepth设置清除的深度
getClearStencil获取清除的模板
setClearStencil设置清除的模板
isAutoDraw查看是否自动显示
setAutoDraw设置自动显示


CARenderImage 方法说明

virtual void visit();

返回值:void

参数:

解释:访问


virtual void draw();

返回值:void

参数:

解释:显示


static CARenderImage* create(int w ,int h, CAImage::PixelFormat eFormat, GLuint uDepthStencilFormat);

返回值:CARenderImage*

参数:

类型参数名说明
intwWidth
inthheight
CAImage::PixelFormat eFormat格式
GLuintuDepthStencilFormatDepthStencilFormat

解释:创建,指定Format和DepthStencilFormat


static CARenderImage* create(int w, int h, CAImage::PixelFormat eFormat);

返回值:CARenderImage*

参数:

类型参数名说明
intwWidth
inthheight
CAImage::PixelFormat eFormat格式

解释:创建,指定Format


static CARenderImage* create(int w, int h);

返回值:CARenderImage*

参数:

类型参数名说明
intwWidth
inthheight

解释:创建


bool initWithWidthAndHeight(int w, int h, CAImage::PixelFormat eFormat);

返回值:bool

参数:

类型参数名说明
intwWidth
inthheight
CAImage::PixelFormat eFormat格式

解释:初始化指定格Format


bool initWithWidthAndHeight(int w, int h, CAImage::PixelFormat eFormat, GLuint uDepthStencilFormat);

返回值:bool

参数:

类型参数名说明
intwWidth
inthheight
CAImage::PixelFormat eFormat格式
GLuintuDepthStencilFormatDepthStencilFormat

解释:初始化指定格Format和DepthStencilFormat


void printscreenWithView(CAView* view);

返回值:void

参数:

类型参数名说明
CAView*view图像

解释:截图并指定view


void printscreenWithView(CAView* view, DPoint offset);

返回值:void

参数:

类型参数名说明
CAView*view图像
DPointoffsetoffset

解释:截图并指定view和offset


void printscreenWithView(CAView* view, const CAColor4B& backgroundColor);

返回值:void

参数:

类型参数名说明
CAView*view图像
const CAColor4B&backgroundColor背景颜色

解释:截图并指定view和backgroundColor


void printscreenWithView(CAView* view, DPoint offset, const CAColor4B& backgroundColor);

返回值:void

参数:

类型参数名说明
CAView*view图像
DPointoffsetoffset
const CAColor4B&backgroundColor背景颜色

解释:截图并指定view、offset和backgroundColor


void clear(const CAColor4B& backgroundColor);

返回值:void

参数:

类型参数名说明
const CAColor4B&backgroundColor背景颜色

解释:清除背景颜色


void clearDepth(float depthValue);

返回值:void

参数:

类型参数名说明
floatdepthValuedepthValue

解释:清除depthValue


void clearStencil(int stencilValue);

返回值:void

参数:

类型参数名说明
intstencilValuestencilValue

解释:清除Stencil


bool saveToFile(const char* szFilePath);

返回值:bool

参数:

类型参数名说明
const char *szFilePath文件

解释:保存到文件


void listenToBackground(CAObject *obj);

返回值:void

参数:

类型参数名说明
CAObject* objobj

解释:监听背景


void listenToForeground(CAObject *obj);

返回值:void

参数:

类型参数名说明
CAObject* objobj

解释:监听前景


unsigned int getClearFlags() const;

返回值:unsigned int 

参数:

解释:获取清除的标志


void setClearFlags(unsigned int uClearFlags);

返回值:void

参数:

类型参数名说明
unsigned int uClearFlags标志

解释:设置清除的标志


const CAColor4F& getClearColor() const;

返回值:const CAColor4F&

参数:

解释:获取清除的颜色


void setClearColor(const CAColor4F &clearColor);

返回值:void

参数:

类型参数名说明
const CAColor4F&clearColor颜色

解释:设置清除的颜色


float getClearDepth() const;

返回值:float

参数:

解释:获取清除的深度


void setClearDepth(float fClearDepth);

返回值:void

参数:

类型参数名说明
floatfClearDepthDepth

解释:设置清除的深度


int getClearStencil() const;

返回值:int

参数:

解释:获取清除的模板


void setClearStencil(float fClearStencil);

返回值:void

参数:

类型参数名说明
floatfClearStencilStencil

解释:设置清除的模板


bool isAutoDraw() const;

返回值:bool

参数:

解释:查看是否自动显示


void setAutoDraw(bool bAutoDraw);

返回值:void

参数:

类型参数名说明
boolbAutoDraw自动显示

解释:设置自动显示

转载本站内容时,请务必注明来自W3xue,违者必究。
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号