mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
update docs
This commit is contained in:
parent
4aa61a3fce
commit
8332cd8ee6
@ -23,6 +23,7 @@
|
|||||||
#include "base/mem.h"
|
#include "base/mem.h"
|
||||||
#include "base/utils.h"
|
#include "base/utils.h"
|
||||||
#include "svg/bsvg_draw.h"
|
#include "svg/bsvg_draw.h"
|
||||||
|
#include "base/widget_vtable.h"
|
||||||
#include "svg_image/svg_image.h"
|
#include "svg_image/svg_image.h"
|
||||||
|
|
||||||
static ret_t svg_image_load_bsvg(widget_t* widget) {
|
static ret_t svg_image_load_bsvg(widget_t* widget) {
|
||||||
@ -59,8 +60,6 @@ static ret_t svg_image_on_paint_self(widget_t* widget, canvas_t* c) {
|
|||||||
bsvg_t bsvg;
|
bsvg_t bsvg;
|
||||||
int32_t x = 0;
|
int32_t x = 0;
|
||||||
int32_t y = 0;
|
int32_t y = 0;
|
||||||
float_t anchor_x = 0;
|
|
||||||
float_t anchor_y = 0;
|
|
||||||
style_t* style = widget->astyle;
|
style_t* style = widget->astyle;
|
||||||
color_t black = color_init(0, 0, 0, 0xff);
|
color_t black = color_init(0, 0, 0, 0xff);
|
||||||
const asset_info_t* asset = svg_image->bsvg_asset;
|
const asset_info_t* asset = svg_image->bsvg_asset;
|
||||||
@ -114,6 +113,7 @@ static const widget_vtable_t s_svg_image_vtable = {.size = sizeof(svg_image_t),
|
|||||||
.destroy = svg_image_destroy,
|
.destroy = svg_image_destroy,
|
||||||
.on_event = image_base_on_event,
|
.on_event = image_base_on_event,
|
||||||
.on_paint_self = svg_image_on_paint_self,
|
.on_paint_self = svg_image_on_paint_self,
|
||||||
|
.on_paint_background = widget_on_paint_null,
|
||||||
.set_prop = image_base_set_prop,
|
.set_prop = image_base_set_prop,
|
||||||
.get_prop = image_base_get_prop};
|
.get_prop = image_base_get_prop};
|
||||||
|
|
||||||
|
@ -21,5 +21,6 @@ Path支持:
|
|||||||
* 4.H/h
|
* 4.H/h
|
||||||
* 5.C/c
|
* 5.C/c
|
||||||
* 6.Q/q
|
* 6.Q/q
|
||||||
|
* 7.A/a
|
||||||
|
|
||||||
|
|
||||||
|
25
tools/svg_gen/README.md
Normal file
25
tools/svg_gen/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
## BSVG 生成工具
|
||||||
|
|
||||||
|
负责把XML格式的SVG文件转换成二进制的SVG。
|
||||||
|
|
||||||
|
|
||||||
|
### 用法说明:
|
||||||
|
|
||||||
|
#### 1.BSVG 生成工具。
|
||||||
|
|
||||||
|
```
|
||||||
|
./bin/bsvggen svg_filename bsvg_filename [bin]
|
||||||
|
```
|
||||||
|
|
||||||
|
* svg\_filename svg文件名。
|
||||||
|
* bsvg\_filename bsvg文件名。
|
||||||
|
* bin 是否生成二进制格式(目标平台有文件系统时使用),缺省生成C语言常量数组。
|
||||||
|
|
||||||
|
#### 2.BSVG dump工具(仅用于调试)。
|
||||||
|
|
||||||
|
```
|
||||||
|
./bin/bsvgdump bsvg_filename
|
||||||
|
```
|
||||||
|
|
||||||
|
* bsvg\_filename bsvg文件名。
|
||||||
|
|
@ -50,7 +50,7 @@ int main(int argc, char* argv[]) {
|
|||||||
TKMEM_INIT(4 * 1024 * 1024)
|
TKMEM_INIT(4 * 1024 * 1024)
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
printf("Usage: %s input", argv[0]);
|
printf("Usage: %s bsvg_filename\n", argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ int main(int argc, char* argv[]) {
|
|||||||
TKMEM_INIT(4 * 1024 * 1024)
|
TKMEM_INIT(4 * 1024 * 1024)
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
printf("Usage: %s input output [bin]\n", argv[0]);
|
printf("Usage: %s svg_filename bsvg_filename [bin]\n", argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
tools/theme_gen/README.md
Normal file
14
tools/theme_gen/README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
## 主题生成工具
|
||||||
|
|
||||||
|
负责把XML格式的主题数据转换成二进制的主题数据。
|
||||||
|
|
||||||
|
### 用法说明:
|
||||||
|
|
||||||
|
```
|
||||||
|
./bin/themegen input output [bin]
|
||||||
|
```
|
||||||
|
|
||||||
|
* input XML格式的主题数据文件名。
|
||||||
|
* output 输出文件名。
|
||||||
|
* bin 是否生成二进制格式(目标平台有文件系统时使用),缺省生成C语言常量数组。
|
||||||
|
|
Loading…
Reference in New Issue
Block a user