mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
change glyph.x/y/w/h to 16bits
This commit is contained in:
parent
20ef92f8ea
commit
2a4a9c5d3c
1386
demos/assets.c
1386
demos/assets.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
||||
* 增加tk\_iostream\_noisy。
|
||||
* 完善窗口管理器(感谢大恒提供补丁)
|
||||
* 前一个窗口为normal window时才支持窗口动画。
|
||||
* glyph的x/y/w/h改为16位,以防超大字体溢出问题。
|
||||
|
||||
* 2019/10/14
|
||||
* 修改widget\_set\_value把value当uint32的BUG.
|
||||
|
@ -61,29 +61,29 @@ typedef struct _font_t font_t;
|
||||
#pragma pack(push, 1)
|
||||
typedef struct _glyph_t {
|
||||
/**
|
||||
* @property {int8_t} x
|
||||
* @property {int16_t} x
|
||||
* @annotation ["readable"]
|
||||
* x坐标。
|
||||
*/
|
||||
int8_t x;
|
||||
int16_t x;
|
||||
/**
|
||||
* @property {int8_t} y
|
||||
* @property {int16_t} y
|
||||
* @annotation ["readable"]
|
||||
* y坐标。
|
||||
*/
|
||||
int8_t y;
|
||||
int16_t y;
|
||||
/**
|
||||
* @property {uint8_t} w
|
||||
* @property {uint16_t} w
|
||||
* @annotation ["readable"]
|
||||
* 宽度。
|
||||
*/
|
||||
uint8_t w;
|
||||
uint16_t w;
|
||||
/**
|
||||
* @property {uint8_t} h
|
||||
* @property {uint16_t} h
|
||||
* @annotation ["readable"]
|
||||
* 高度。
|
||||
*/
|
||||
uint8_t h;
|
||||
uint16_t h;
|
||||
/**
|
||||
* @property {uint16_t} advance
|
||||
* @annotation ["readable"]
|
||||
|
@ -90,10 +90,10 @@ uint32_t font_gen_buff(font_t* font, uint16_t font_size, const char* str, uint8_
|
||||
uint32_t data_size = (g.pitch ? g.pitch : g.w) * g.h;
|
||||
return_value_if_fail(buff_size > (iter->offset + data_size + 4), 0);
|
||||
|
||||
save_uint8(p, g.x);
|
||||
save_uint8(p, g.y);
|
||||
save_uint8(p, g.w);
|
||||
save_uint8(p, g.h);
|
||||
save_uint16(p, g.x);
|
||||
save_uint16(p, g.y);
|
||||
save_uint16(p, g.w);
|
||||
save_uint16(p, g.h);
|
||||
save_uint16(p, g.advance);
|
||||
save_uint8(p, g.format);
|
||||
save_uint8(p, g.pitch);
|
||||
|
Loading…
Reference in New Issue
Block a user