CARenderImage(图像渲染)

类说明

图像渲染

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自动显示

解释:设置自动显示

作者:唐伯虎点蚊香,如若转载,请注明出处:https://www.web176.com/crossapp/10179.html

(0)
打赏 支付宝 支付宝 微信 微信
唐伯虎点蚊香的头像唐伯虎点蚊香
上一篇 2023年2月21日
下一篇 2023年2月21日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注