- UID
- 430
- 麦力
- 405
- 注册时间
- 2015-12-18
- 最后登录
- 2018-8-12
- 精华
- 1
- 阅读权限
- 100
- 在线时间
- 44 小时
|
本帖最后由 dscao 于 2016-1-1 11:58 编辑
今天重新下载了模拟机,开始可以模拟了。后来把背景图换成几何图形,结果这段过不去:
- Geometry *geometry[6]; /*创建存储几何图形的指针数组, 几何图形数量不能超过指针数组大小*/
- uint8_t numgeo = 0;
- LayerGeometry layer_geometry; /*几何图层结构体*/
- memset(geometry, 0, sizeof(geometry));
- /*直线*/
- Line l = {{2,50}, {124,50}}; //直线的起始点坐标
- Geometry lg = {GeometryTypeLine, FillOutline, GColorBlack, (void*)&l};
- geometry[numgeo++] = ≶ //存入指针数组中
- /*多边形*/
- GPoint ppoint[4] = {{0,0}, {0,128}, {128,0}, {128,128}};//多边形各个点坐标
- Polygon p = {4, ppoint};
- Geometry pg = {GeometryTypePolygon, FillArea, GColorBlack,(void*)&p};
- geometry[numgeo++] = &pg;
- /*初始化几何结构体*/
- layer_geometry.num = numgeo;
- layer_geometry.p_g = geometry;
- /*创建几何图层*/
- P_Layer layer = app_layer_create_geometry(&layer_geometry);
- app_window_add_layer(p_window, layer);
复制代码
如下提示:
正在编译...
D:\simulator_win64\watchface_hm_multi.c: In function 'init_mwd_window':
D:\simulator_win64\watchface_hm_multi.c:309:2: error: unknown type name 'Polygon'
Polygon p = {4, ppoint};
^
D:\simulator_win64\watchface_hm_multi.c:309:2: warning: excess elements in scalar initializer
D:\simulator_win64\watchface_hm_multi.c:309:2: warning: (near initialization for 'p')
SDK编译正常:
多显电子表.MWP.rar
(9.91 KB, 下载次数: 580)
多显电子表.MAI.rar
(9.91 KB, 下载次数: 569)
去掉后面的扩展名.rar
|
|