format code

This commit is contained in:
xianjimli 2020-02-11 17:46:48 +08:00
parent 64a840b953
commit ea72de2e53
8 changed files with 29 additions and 25 deletions

View File

@ -125,7 +125,8 @@ typedef ret_t (*vgcanvas_create_fbo_t)(vgcanvas_t* vg, framebuffer_object_t* fbo
typedef ret_t (*vgcanvas_destroy_fbo_t)(vgcanvas_t* vg, framebuffer_object_t* fbo);
typedef ret_t (*vgcanvas_bind_fbo_t)(vgcanvas_t* vg, framebuffer_object_t* fbo);
typedef ret_t (*vgcanvas_unbind_fbo_t)(vgcanvas_t* vg, framebuffer_object_t* fbo);
typedef ret_t (*vgcanvas_nanovg_fbo_to_bitmap_t)(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo, bitmap_t* img, rect_t* r);
typedef ret_t (*vgcanvas_nanovg_fbo_to_bitmap_t)(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo,
bitmap_t* img, rect_t* r);
typedef ret_t (*vgcanvas_destroy_t)(vgcanvas_t* vg);

View File

@ -3912,7 +3912,6 @@ bitmap_t* widget_take_snapshot_rect(widget_t* widget, rect_t* r) {
#elif defined(WITH_NANOVG_GPU)
bitmap_t* widget_take_snapshot_rect(widget_t* widget, rect_t* r) {
bitmap_t* img;
uint32_t w = 0;
uint32_t h = 0;
@ -3920,7 +3919,8 @@ bitmap_t* widget_take_snapshot_rect(widget_t* widget, rect_t* r) {
vgcanvas_t* vg = NULL;
framebuffer_object_t fbo;
native_window_t* native_window = (native_window_t*)widget_get_prop_pointer(window_manager(), WIDGET_PROP_NATIVE_WINDOW);
native_window_t* native_window =
(native_window_t*)widget_get_prop_pointer(window_manager(), WIDGET_PROP_NATIVE_WINDOW);
return_value_if_fail(native_window != NULL, NULL);
c = native_window_get_canvas(native_window);

View File

@ -89,7 +89,8 @@ static ret_t vgcanvas_nanovg_unbind_fbo(vgcanvas_t* vgcanvas, framebuffer_object
return RET_OK;
}
static ret_t vgcanvas_nanovg_fbo_to_imageData(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo, bitmap_t* img, rect_t* r) {
static ret_t vgcanvas_nanovg_fbo_to_imageData(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo,
bitmap_t* img, rect_t* r) {
return RET_NOT_IMPL;
}

View File

@ -204,7 +204,8 @@ static ret_t vgcanvas_nanovg_unbind_fbo(vgcanvas_t* vgcanvas, framebuffer_object
return RET_OK;
}
static ret_t vgcanvas_nanovg_fbo_to_bitmap(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo, bitmap_t* img, rect_t* r) {
static ret_t vgcanvas_nanovg_fbo_to_bitmap(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo,
bitmap_t* img, rect_t* r) {
uint32_t x = 0;
uint32_t y = 0;
uint32_t height = 0;
@ -225,7 +226,8 @@ static ret_t vgcanvas_nanovg_fbo_to_bitmap(vgcanvas_t* vgcanvas, framebuffer_obj
}
/* 因为 opengles 的原点坐标为左下角,所以需要把 AWTK 的坐标AWTK 是右上角为原点的坐标系)转换为左下角为原点的坐标系*/
nvgluReadCurrentFramebufferData(x, height - img->h - y, img->w, img->h, fbo->w * fbo->ratio, height, data);
nvgluReadCurrentFramebufferData(x, height - img->h - y, img->w, img->h, fbo->w * fbo->ratio,
height, data);
p = data + ((img->h - 1) * img->line_length);

View File

@ -49,7 +49,8 @@ static ret_t vgcanvas_nanovg_bind_fbo(vgcanvas_t* vgcanvas, framebuffer_object_t
return RET_NOT_IMPL;
}
static ret_t vgcanvas_nanovg_fbo_to_imageData(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo, bitmap_t* img, rect_t* r) {
static ret_t vgcanvas_nanovg_fbo_to_imageData(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo,
bitmap_t* img, rect_t* r) {
return RET_NOT_IMPL;
}

View File

@ -10,7 +10,6 @@
"license": "ISC",
"dependencies": {
"crawler": "^1.2.1",
"segment": "^0.1.3",
"url": "^0.11.0"
}
}