×

一、简介与环境搭建

CrossApp简介CrossApp摘要CrossApp坐标系浅谈CrossApp屏幕适配方案CrossApp源码结构CrossApp的MVC模式CrossApp项目结构及入口CrossApp内存管理CrossApp类结构图创建CrossApp工程CAVector、CAList、CADeque、CAMap(数据容器)Windows 开发下VS2013环境搭建Windows 开发下Android环境配置Mac OS 开发下Xcode环境搭建Mac OS 下iOS移植android环境配置

二、CrossApp简单控件的使用

DLayout(自适应布局)CALabel(显示文本)CAImage、CAImageView(显示一张图片)CAScale9ImageView(九宫格图片拉伸)CAButton(按钮)CATextView(多行输入框)CATextViewDelegateCASwitch(开关控件)CAProgress(进度条)CAAlertView(提示框)CAScrollView(滚动视图)CAScrollViewDelegateCAListView(列表)CAListViewDataSourceCAListViewDelegateCATableView(表单视图)CATableViewDataSourceCATableViewDelegateCATableViewCellCACollectionView(容器)CACollectionViewDataSourceCASlider(滑动条)CAStepper(步进控件)CAPageView(页面切换)CAPageViewDelegateCAWaterfallView(瀑布流控件)CAWaterfallViewDataSourceCAWaterfallViewDelegateCAWaterfallViewCellCATextField(输入框)CATextFieldDelegateCAAutoCollectionView(自动化布局容器)CAAutoCollectionViewDataSourceCAAutoCollectionViewDelegateCAVideoPlayerControlView(视频播放器控制视图)CAVideoPlayerControlViewDelegateCAWebView(Web视图控件)CAWebViewDelegateCAGifView(显示Gif图片)CARenderImage(图像渲染)CASegmentedControl(分段控制)CAPickerView(视图选择器)CAPickerViewDataSourceCAPickerViewDelegateCAActivityIndicatorView(活动指示器)CrossApp UIEdit(UI编辑器)

三、视图控制

CAViewController(视图控制器)CADrawerController(抽屉控制器)CANavigationController(导航控制器)CANavigationBarDelegateCANavigationBarItemCANavigationBarCATabBarController(标签栏控制器)CATabBarDelegateCATabBarItem

四、调用系统支持

CADevice

五、数据的解析与存储

CAUserDefault简单存储SQlite的使用json解析xml解析

六、网络

网络通信之httphttp请求网络图

七,动画

CAViewAnimation(动画实现)

八、宏定义

宏定义

九、其他控件的使用

CAViewCAViewDelegateCATextField(输入框1.2以前版本)CAObjectCAResponderCAPullToRefreshViewCAControlCAWindowCABarItemCABarButtonItemCASchedulerCAMediaDelegateCAKeypadDelegate

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*

参数:

类型 参数名 说明
int w Width
int h height
CAImage::PixelFormat  eFormat 格式
GLuint uDepthStencilFormat DepthStencilFormat

解释:创建,指定Format和DepthStencilFormat


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

返回值:CARenderImage*

参数:

类型 参数名 说明
int w Width
int h height
CAImage::PixelFormat  eFormat 格式

解释:创建,指定Format


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

返回值:CARenderImage*

参数:

类型 参数名 说明
int w Width
int h height

解释:创建


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

返回值:bool

参数:

类型 参数名 说明
int w Width
int h height
CAImage::PixelFormat  eFormat 格式

解释:初始化指定格Format


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

返回值:bool

参数:

类型 参数名 说明
int w Width
int h height
CAImage::PixelFormat  eFormat 格式
GLuint uDepthStencilFormat DepthStencilFormat

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


void printscreenWithView(CAView* view);

返回值:void

参数:

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

解释:截图并指定view


void printscreenWithView(CAView* view, DPoint offset);

返回值:void

参数:

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

解释:截图并指定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 图像
DPoint offset offset
const CAColor4B& backgroundColor 背景颜色

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


void clear(const CAColor4B& backgroundColor);

返回值:void

参数:

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

解释:清除背景颜色


void clearDepth(float depthValue);

返回值:void

参数:

类型 参数名 说明
float depthValue depthValue

解释:清除depthValue


void clearStencil(int stencilValue);

返回值:void

参数:

类型 参数名 说明
int stencilValue stencilValue

解释:清除Stencil


bool saveToFile(const char* szFilePath);

返回值:bool

参数:

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

解释:保存到文件


void listenToBackground(CAObject *obj);

返回值:void

参数:

类型 参数名 说明
CAObject*  obj obj

解释:监听背景


void listenToForeground(CAObject *obj);

返回值:void

参数:

类型 参数名 说明
CAObject*  obj obj

解释:监听前景


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

参数:

类型 参数名 说明
float fClearDepth Depth

解释:设置清除的深度


int getClearStencil() const;

返回值:int

参数:

解释:获取清除的模板


void setClearStencil(float fClearStencil);

返回值:void

参数:

类型 参数名 说明
float fClearStencil Stencil

解释:设置清除的模板


bool isAutoDraw() const;

返回值:bool

参数:

解释:查看是否自动显示


void setAutoDraw(bool bAutoDraw);

返回值:void

参数:

类型 参数名 说明
bool bAutoDraw 自动显示

解释:设置自动显示


分类导航

关注微信下载离线手册

bootwiki移动版 bootwiki
(群号:472910771)