BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
23ca4fdb
Commit
23ca4fdb
authored
Jun 16, 2016
by
Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further modifications with styles
parent
27fa1699
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
43 deletions
+35
-43
lv_draw.c
lv_draw/lv_draw.c
+3
-3
lv_draw_rbasic.c
lv_draw/lv_draw_rbasic.c
+1
-1
lv_draw_rbasic.h
lv_draw/lv_draw_rbasic.h
+1
-1
lv_draw_vbasic.h
lv_draw/lv_draw_vbasic.h
+1
-1
lv_obj.c
lv_obj/lv_obj.c
+2
-12
lv_obj.h
lv_obj/lv_obj.h
+0
-3
lv_btn.c
lv_objx/lv_btn.c
+3
-3
lv_img.c
lv_objx/lv_img.c
+11
-7
lv_img.h
lv_objx/lv_img.h
+1
-0
lv_page.c
lv_objx/lv_page.c
+6
-6
lv_page.h
lv_objx/lv_page.h
+0
-1
lv_rect.c
lv_objx/lv_rect.c
+4
-4
lv_rect.h
lv_objx/lv_rect.h
+2
-1
No files found.
lv_draw/lv_draw.c
View file @
23ca4fdb
...
@@ -47,14 +47,14 @@ static void (*map_fp)(const area_t * cords_p, const area_t * mask_p, const color
...
@@ -47,14 +47,14 @@ static void (*map_fp)(const area_t * cords_p, const area_t * mask_p, const color
#else
#else
static
void
(
*
fill_fp
)(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
color_t
color
,
opa_t
opa
)
=
lv_rfill
;
static
void
(
*
fill_fp
)(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
color_t
color
,
opa_t
opa
)
=
lv_rfill
;
static
void
(
*
letter_fp
)(
const
point_t
*
pos_p
,
const
area_t
*
mask_p
,
const
font_t
*
font_p
,
uint8_t
letter
,
color_t
color
,
opa_t
opa
)
=
lv_rletter
;
static
void
(
*
letter_fp
)(
const
point_t
*
pos_p
,
const
area_t
*
mask_p
,
const
font_t
*
font_p
,
uint8_t
letter
,
color_t
color
,
opa_t
opa
)
=
lv_rletter
;
static
void
(
*
map_fp
)(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
)
=
lv_rmap
;
static
void
(
*
map_fp
)(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
color_t
recolor
,
opa_t
recolor_opa
)
=
lv_rmap
;
#endif
#endif
static
lv_rects_t
lv_img_no_pic_rects
=
{
static
lv_rects_t
lv_img_no_pic_rects
=
{
.
objs
.
color
=
COLOR_BLACK
,
.
gcolor
=
COLOR_BLACK
,
.
objs
.
color
=
COLOR_BLACK
,
.
gcolor
=
COLOR_BLACK
,
.
bcolor
=
COLOR_RED
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
100
,
.
bcolor
=
COLOR_RED
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
100
,
.
round
=
0
,
.
objs
.
empty
=
0
.
round
=
0
,
.
empty
=
0
};
};
static
lv_labels_t
lv_img_no_pic_labels
=
{
static
lv_labels_t
lv_img_no_pic_labels
=
{
...
@@ -80,7 +80,7 @@ static lv_labels_t lv_img_no_pic_labels = {
...
@@ -80,7 +80,7 @@ static lv_labels_t lv_img_no_pic_labels = {
void
lv_draw_rect
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
void
lv_draw_rect
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
lv_rects_t
*
rects_p
,
opa_t
opa
)
const
lv_rects_t
*
rects_p
,
opa_t
opa
)
{
{
if
(
rects_p
->
objs
.
empty
==
0
){
if
(
rects_p
->
empty
==
0
){
lv_draw_rect_main_mid
(
cords_p
,
mask_p
,
rects_p
,
opa
);
lv_draw_rect_main_mid
(
cords_p
,
mask_p
,
rects_p
,
opa
);
if
(
rects_p
->
round
!=
0
)
{
if
(
rects_p
->
round
!=
0
)
{
...
...
lv_draw/lv_draw_rbasic.c
View file @
23ca4fdb
...
@@ -111,7 +111,7 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
...
@@ -111,7 +111,7 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
*/
*/
void
lv_rmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
void
lv_rmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
color_t
recolor
,
color
_t
recolor_opa
)
color_t
recolor
,
opa
_t
recolor_opa
)
{
{
area_t
masked_a
;
area_t
masked_a
;
bool
union_ok
;
bool
union_ok
;
...
...
lv_draw/lv_draw_rbasic.h
View file @
23ca4fdb
...
@@ -31,7 +31,7 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
...
@@ -31,7 +31,7 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
color_t
color
,
opa_t
opa
);
color_t
color
,
opa_t
opa
);
void
lv_rmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
void
lv_rmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
color_t
recolor
,
color
_t
recolor_opa
);
color_t
recolor
,
opa
_t
recolor_opa
);
/**********************
/**********************
* MACROS
* MACROS
**********************/
**********************/
...
...
lv_draw/lv_draw_vbasic.h
View file @
23ca4fdb
...
@@ -37,7 +37,7 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
...
@@ -37,7 +37,7 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
void
lv_vmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
void
lv_vmap
(
const
area_t
*
cords_p
,
const
area_t
*
mask_p
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
const
color_t
*
map_p
,
opa_t
opa
,
bool
transp
,
color_t
recolor
,
color
_t
recolor_opa
);
color_t
recolor
,
opa
_t
recolor_opa
);
/**********************
/**********************
...
...
lv_obj/lv_obj.c
View file @
23ca4fdb
...
@@ -34,10 +34,8 @@ lv_obj_t* def_scr_dp = NULL;
...
@@ -34,10 +34,8 @@ lv_obj_t* def_scr_dp = NULL;
lv_obj_t
*
act_scr_dp
=
NULL
;
lv_obj_t
*
act_scr_dp
=
NULL
;
ll_dsc_t
scr_ll
;
ll_dsc_t
scr_ll
;
lv_objs_t
lv_objs_def
=
{.
color
=
COLOR_GRAY
,
.
empty
=
0
};
lv_objs_t
lv_objs_def
=
{.
color
=
COLOR_RED
};
lv_objs_t
lv_objs_scr
=
{.
color
=
LV_OBJ_DEF_SCR_COLOR
,
.
empty
=
0
};
lv_objs_t
lv_objs_scr
=
{.
color
=
LV_OBJ_DEF_SCR_COLOR
};
lv_objs_t
lv_objs_color
=
{.
color
=
COLOR_RED
,
.
empty
=
0
};
lv_objs_t
lv_objs_empty
=
{.
color
=
COLOR_GRAY
,
.
empty
=
1
};
/**********************
/**********************
* MACROS
* MACROS
...
@@ -326,14 +324,9 @@ lv_objs_t * lv_objs_get(lv_objs_builtin_t style, lv_objs_t * copy_p)
...
@@ -326,14 +324,9 @@ lv_objs_t * lv_objs_get(lv_objs_builtin_t style, lv_objs_t * copy_p)
case
LV_OBJS_DEF
:
case
LV_OBJS_DEF
:
style_p
=
&
lv_objs_def
;
style_p
=
&
lv_objs_def
;
break
;
break
;
case
LV_OBJS_COLOR
:
style_p
=
&
lv_objs_color
;
break
;
case
LV_OBJS_SCR
:
case
LV_OBJS_SCR
:
style_p
=
&
lv_objs_scr
;
style_p
=
&
lv_objs_scr
;
break
;
break
;
case
LV_OBJS_EMPTY
:
style_p
=
&
lv_objs_empty
;
break
;
break
;
default:
default:
style_p
=
NULL
;
style_p
=
NULL
;
...
@@ -1232,9 +1225,6 @@ static bool lv_obj_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
...
@@ -1232,9 +1225,6 @@ static bool lv_obj_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
}
}
lv_objs_t
*
objs_p
=
lv_obj_get_style
(
obj_dp
);
lv_objs_t
*
objs_p
=
lv_obj_get_style
(
obj_dp
);
/*Do not draw the empty objects*/
if
(
objs_p
->
empty
!=
0
)
return
true
;
opa_t
opa
=
lv_obj_get_opa
(
obj_dp
);
opa_t
opa
=
lv_obj_get_opa
(
obj_dp
);
color_t
color
=
objs_p
->
color
;
color_t
color
=
objs_p
->
color
;
...
...
lv_obj/lv_obj.h
View file @
23ca4fdb
...
@@ -133,15 +133,12 @@ typedef enum
...
@@ -133,15 +133,12 @@ typedef enum
typedef
struct
typedef
struct
{
{
color_t
color
;
color_t
color
;
uint8_t
empty
:
1
;
}
lv_objs_t
;
}
lv_objs_t
;
typedef
enum
typedef
enum
{
{
LV_OBJS_DEF
,
LV_OBJS_DEF
,
LV_OBJS_COLOR
,
LV_OBJS_SCR
,
LV_OBJS_SCR
,
LV_OBJS_EMPTY
,
}
lv_objs_builtin_t
;
}
lv_objs_builtin_t
;
/**********************
/**********************
...
...
lv_objx/lv_btn.c
View file @
23ca4fdb
...
@@ -58,7 +58,7 @@ static lv_btns_t lv_btns_def =
...
@@ -58,7 +58,7 @@ static lv_btns_t lv_btns_def =
.
rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
rects
.
bopa
=
50
,
.
rects
.
bopa
=
50
,
.
rects
.
objs
.
empty
=
0
,
.
rects
.
empty
=
0
,
.
rects
.
round
=
4
*
LV_STYLE_MULT
,
.
rects
.
round
=
4
*
LV_STYLE_MULT
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
.
rects
.
vpad
=
15
*
LV_STYLE_MULT
,
.
rects
.
vpad
=
15
*
LV_STYLE_MULT
,
...
@@ -66,7 +66,7 @@ static lv_btns_t lv_btns_def =
...
@@ -66,7 +66,7 @@ static lv_btns_t lv_btns_def =
static
lv_btns_t
lv_btns_transp
=
static
lv_btns_t
lv_btns_transp
=
{
{
.
rects
.
bwidth
=
0
,
.
rects
.
bwidth
=
0
,
.
rects
.
objs
.
empty
=
1
,
.
rects
.
empty
=
1
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
.
rects
.
vpad
=
15
*
LV_STYLE_MULT
,
.
rects
.
vpad
=
15
*
LV_STYLE_MULT
,
};
};
...
@@ -79,7 +79,7 @@ static lv_btns_t lv_btns_border =
...
@@ -79,7 +79,7 @@ static lv_btns_t lv_btns_border =
.
bcolor
[
LV_BTN_STATE_TGL_PR
]
=
COLOR_BLACK
,
.
bcolor
[
LV_BTN_STATE_TGL_PR
]
=
COLOR_BLACK
,
.
bcolor
[
LV_BTN_STATE_INA
]
=
COLOR_GRAY
,
.
bcolor
[
LV_BTN_STATE_INA
]
=
COLOR_GRAY
,
.
rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
rects
.
objs
.
empty
=
1
,
.
rects
.
empty
=
1
,
.
rects
.
bopa
=
50
,
.
rects
.
bopa
=
50
,
.
rects
.
round
=
4
*
LV_STYLE_MULT
,
.
rects
.
round
=
4
*
LV_STYLE_MULT
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
.
rects
.
hpad
=
10
*
LV_STYLE_MULT
,
...
...
lv_objx/lv_img.c
View file @
23ca4fdb
...
@@ -71,7 +71,9 @@ lv_obj_t* lv_img_create(lv_obj_t* par_dp, lv_obj_t * copy_dp)
...
@@ -71,7 +71,9 @@ lv_obj_t* lv_img_create(lv_obj_t* par_dp, lv_obj_t * copy_dp)
img_ext_dp
->
fn_dp
=
NULL
;
img_ext_dp
->
fn_dp
=
NULL
;
img_ext_dp
->
w
=
lv_obj_get_width
(
new_obj_dp
);
img_ext_dp
->
w
=
lv_obj_get_width
(
new_obj_dp
);
img_ext_dp
->
h
=
lv_obj_get_height
(
new_obj_dp
);
img_ext_dp
->
h
=
lv_obj_get_height
(
new_obj_dp
);
img_ext_dp
->
transp
=
0
;
/*Enable auto size for non screens*/
if
(
par_dp
!=
NULL
)
{
if
(
par_dp
!=
NULL
)
{
img_ext_dp
->
auto_size
=
1
;
img_ext_dp
->
auto_size
=
1
;
}
else
{
}
else
{
...
@@ -190,12 +192,14 @@ void lv_img_set_file(lv_obj_t* obj_dp, const char * fn)
...
@@ -190,12 +192,14 @@ void lv_img_set_file(lv_obj_t* obj_dp, const char * fn)
/*Create a dummy header*/
/*Create a dummy header*/
header
.
w
=
lv_obj_get_width
(
obj_dp
);
header
.
w
=
lv_obj_get_width
(
obj_dp
);
header
.
h
=
lv_obj_get_height
(
obj_dp
);
header
.
h
=
lv_obj_get_height
(
obj_dp
);
header
.
transp
=
0
;
}
}
fs_close
(
&
file
);
fs_close
(
&
file
);
img_ext_p
->
w
=
header
.
w
;
img_ext_p
->
w
=
header
.
w
;
img_ext_p
->
h
=
header
.
h
;
img_ext_p
->
h
=
header
.
h
;
img_ext_p
->
transp
=
header
.
transp
;
#if LV_UPSCALE_MAP != 0
#if LV_UPSCALE_MAP != 0
img_ext_p
->
w
*=
LV_DOWNSCALE
;
img_ext_p
->
w
*=
LV_DOWNSCALE
;
img_ext_p
->
h
*=
LV_DOWNSCALE
;
img_ext_p
->
h
*=
LV_DOWNSCALE
;
...
@@ -257,9 +261,10 @@ bool lv_img_get_auto_size(lv_obj_t* obj_dp)
...
@@ -257,9 +261,10 @@ bool lv_img_get_auto_size(lv_obj_t* obj_dp)
static
bool
lv_img_design
(
lv_obj_t
*
obj_dp
,
const
area_t
*
mask_p
,
lv_design_mode_t
mode
)
static
bool
lv_img_design
(
lv_obj_t
*
obj_dp
,
const
area_t
*
mask_p
,
lv_design_mode_t
mode
)
{
{
lv_imgs_t
*
imgs_p
=
lv_obj_get_style
(
obj_dp
);
lv_imgs_t
*
imgs_p
=
lv_obj_get_style
(
obj_dp
);
lv_img_ext_t
*
ext_p
=
lv_obj_get_ext
(
obj_dp
);
if
(
mode
==
LV_DESIGN_COVER_CHK
)
{
if
(
mode
==
LV_DESIGN_COVER_CHK
)
{
if
(
imgs_p
->
objs
.
empty
==
0
)
{
if
(
ext_p
->
transp
==
0
)
{
bool
cover
;
bool
cover
;
cover
=
area_is_in
(
mask_p
,
&
obj_dp
->
cords
);
cover
=
area_is_in
(
mask_p
,
&
obj_dp
->
cords
);
return
cover
;
return
cover
;
...
@@ -267,7 +272,6 @@ static bool lv_img_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mod
...
@@ -267,7 +272,6 @@ static bool lv_img_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mod
else
return
false
;
else
return
false
;
}
}
lv_img_ext_t
*
img_ext_p
=
lv_obj_get_ext
(
obj_dp
);
area_t
cords
;
area_t
cords
;
lv_obj_get_cords
(
obj_dp
,
&
cords
);
lv_obj_get_cords
(
obj_dp
,
&
cords
);
...
@@ -275,13 +279,13 @@ static bool lv_img_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mod
...
@@ -275,13 +279,13 @@ static bool lv_img_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mod
area_t
cords_tmp
;
area_t
cords_tmp
;
cords_tmp
.
y1
=
cords
.
y1
;
cords_tmp
.
y1
=
cords
.
y1
;
cords_tmp
.
y2
=
cords
.
y1
+
img_
ext_p
->
h
-
1
;
cords_tmp
.
y2
=
cords
.
y1
+
ext_p
->
h
-
1
;
for
(;
cords_tmp
.
y1
<
cords
.
y2
;
cords_tmp
.
y1
+=
img_ext_p
->
h
,
cords_tmp
.
y2
+=
img_
ext_p
->
h
)
{
for
(;
cords_tmp
.
y1
<
cords
.
y2
;
cords_tmp
.
y1
+=
ext_p
->
h
,
cords_tmp
.
y2
+=
ext_p
->
h
)
{
cords_tmp
.
x1
=
cords
.
x1
;
cords_tmp
.
x1
=
cords
.
x1
;
cords_tmp
.
x2
=
cords
.
x1
+
img_
ext_p
->
w
-
1
;
cords_tmp
.
x2
=
cords
.
x1
+
ext_p
->
w
-
1
;
for
(;
cords_tmp
.
x1
<
cords
.
x2
;
cords_tmp
.
x1
+=
img_ext_p
->
w
,
cords_tmp
.
x2
+=
img_
ext_p
->
w
)
{
for
(;
cords_tmp
.
x1
<
cords
.
x2
;
cords_tmp
.
x1
+=
ext_p
->
w
,
cords_tmp
.
x2
+=
ext_p
->
w
)
{
lv_draw_img
(
&
cords_tmp
,
mask_p
,
lv_obj_get_style
(
obj_dp
),
opa
,
img_
ext_p
->
fn_dp
);
lv_draw_img
(
&
cords_tmp
,
mask_p
,
imgs_p
,
opa
,
ext_p
->
fn_dp
);
}
}
}
}
return
true
;
return
true
;
...
...
lv_objx/lv_img.h
View file @
23ca4fdb
...
@@ -35,6 +35,7 @@ typedef struct
...
@@ -35,6 +35,7 @@ typedef struct
cord_t
w
;
cord_t
w
;
cord_t
h
;
cord_t
h
;
uint8_t
auto_size
:
1
;
uint8_t
auto_size
:
1
;
uint8_t
transp
:
1
;
/*Transp. bit in the images header (library handles this)*/
}
lv_img_ext_t
;
}
lv_img_ext_t
;
typedef
enum
typedef
enum
...
...
lv_objx/lv_page.c
View file @
23ca4fdb
...
@@ -38,7 +38,7 @@ static lv_pages_t lv_pages_def =
...
@@ -38,7 +38,7 @@ static lv_pages_t lv_pages_def =
.
bg_rects
.
bopa
=
50
,
.
bg_rects
.
bopa
=
50
,
.
bg_rects
.
bwidth
=
0
*
LV_STYLE_MULT
,
.
bg_rects
.
bwidth
=
0
*
LV_STYLE_MULT
,
.
bg_rects
.
round
=
2
*
LV_STYLE_MULT
,
.
bg_rects
.
round
=
2
*
LV_STYLE_MULT
,
.
bg_rects
.
objs
.
empty
=
0
,
.
bg_rects
.
empty
=
0
,
.
bg_rects
.
hpad
=
10
,
.
bg_rects
.
hpad
=
10
,
.
bg_rects
.
vpad
=
10
,
.
bg_rects
.
vpad
=
10
,
...
@@ -48,7 +48,7 @@ static lv_pages_t lv_pages_def =
...
@@ -48,7 +48,7 @@ static lv_pages_t lv_pages_def =
.
sb_rects
.
bopa
=
50
,
.
sb_rects
.
bopa
=
50
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
objs
.
empty
=
0
,
.
sb_rects
.
empty
=
0
,
.
sb_width
=
8
*
LV_STYLE_MULT
,
.
sb_width
=
8
*
LV_STYLE_MULT
,
.
sb_opa
=
50
,
.
sb_opa
=
50
,
...
@@ -69,7 +69,7 @@ static lv_pages_t lv_pages_paper =
...
@@ -69,7 +69,7 @@ static lv_pages_t lv_pages_paper =
.
bg_rects
.
bopa
=
100
,
.
bg_rects
.
bopa
=
100
,
.
bg_rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bg_rects
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bg_rects
.
round
=
0
*
LV_STYLE_MULT
,
.
bg_rects
.
round
=
0
*
LV_STYLE_MULT
,
.
bg_rects
.
objs
.
empty
=
0
,
.
bg_rects
.
empty
=
0
,
.
bg_rects
.
hpad
=
20
*
LV_STYLE_MULT
,
.
bg_rects
.
hpad
=
20
*
LV_STYLE_MULT
,
.
bg_rects
.
vpad
=
20
*
LV_STYLE_MULT
,
.
bg_rects
.
vpad
=
20
*
LV_STYLE_MULT
,
...
@@ -79,7 +79,7 @@ static lv_pages_t lv_pages_paper =
...
@@ -79,7 +79,7 @@ static lv_pages_t lv_pages_paper =
.
sb_rects
.
bopa
=
100
,
.
sb_rects
.
bopa
=
100
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
objs
.
empty
=
0
,
.
sb_rects
.
empty
=
0
,
.
sb_width
=
10
*
LV_STYLE_MULT
,
.
sb_width
=
10
*
LV_STYLE_MULT
,
.
sb_opa
=
50
,
.
sb_opa
=
50
,
...
@@ -93,7 +93,7 @@ static lv_pages_t lv_pages_paper =
...
@@ -93,7 +93,7 @@ static lv_pages_t lv_pages_paper =
static
lv_pages_t
lv_pages_transp
=
static
lv_pages_t
lv_pages_transp
=
{
{
.
bg_rects
.
objs
.
empty
=
1
,
.
bg_rects
.
empty
=
1
,
.
bg_rects
.
hpad
=
1
,
.
bg_rects
.
hpad
=
1
,
.
bg_rects
.
vpad
=
1
,
.
bg_rects
.
vpad
=
1
,
...
@@ -103,7 +103,7 @@ static lv_pages_t lv_pages_transp =
...
@@ -103,7 +103,7 @@ static lv_pages_t lv_pages_transp =
.
sb_rects
.
bopa
=
0
,
.
sb_rects
.
bopa
=
0
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
bwidth
=
1
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
round
=
5
*
LV_STYLE_MULT
,
.
sb_rects
.
objs
.
empty
=
0
,
.
sb_rects
.
empty
=
0
,
.
sb_width
=
8
*
LV_STYLE_MULT
,
.
sb_width
=
8
*
LV_STYLE_MULT
,
.
sb_opa
=
50
,
.
sb_opa
=
50
,
...
...
lv_objx/lv_page.h
View file @
23ca4fdb
...
@@ -57,7 +57,6 @@ typedef enum
...
@@ -57,7 +57,6 @@ typedef enum
LV_PAGES_TRANSP
,
LV_PAGES_TRANSP
,
}
lv_pages_builtin_t
;
}
lv_pages_builtin_t
;
/**********************
/**********************
* GLOBAL PROTOTYPES
* GLOBAL PROTOTYPES
**********************/
**********************/
...
...
lv_objx/lv_rect.c
View file @
23ca4fdb
...
@@ -33,16 +33,16 @@ static bool lv_rect_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
...
@@ -33,16 +33,16 @@ static bool lv_rect_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
static
lv_rects_t
lv_rects_def
=
static
lv_rects_t
lv_rects_def
=
{
.
objs
.
color
=
COLOR_MAKE
(
0x50
,
0x70
,
0x90
),
.
gcolor
=
COLOR_MAKE
(
0x20
,
0x40
,
0x60
),
{
.
objs
.
color
=
COLOR_MAKE
(
0x50
,
0x70
,
0x90
),
.
gcolor
=
COLOR_MAKE
(
0x20
,
0x40
,
0x60
),
.
bcolor
=
COLOR_WHITE
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
50
,
.
bcolor
=
COLOR_WHITE
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
50
,
.
round
=
4
*
LV_STYLE_MULT
,
.
objs
.
empty
=
0
,
.
round
=
4
*
LV_STYLE_MULT
,
.
empty
=
0
,
.
hpad
=
0
,
.
vpad
=
0
};
.
hpad
=
0
,
.
vpad
=
0
};
static
lv_rects_t
lv_rects_transp
=
static
lv_rects_t
lv_rects_transp
=
{
.
bwidth
=
0
,
.
objs
.
empty
=
0
,
{
.
bwidth
=
0
,
.
empty
=
1
,
.
hpad
=
0
,
.
vpad
=
0
};
.
hpad
=
0
,
.
vpad
=
0
};
static
lv_rects_t
lv_rects_border
=
static
lv_rects_t
lv_rects_border
=
{
.
bcolor
=
COLOR_BLACK
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
100
,
{
.
bcolor
=
COLOR_BLACK
,
.
bwidth
=
2
*
LV_STYLE_MULT
,
.
bopa
=
100
,
.
round
=
4
*
LV_STYLE_MULT
,
.
objs
.
empty
=
1
,
.
round
=
4
*
LV_STYLE_MULT
,
.
empty
=
1
,
.
hpad
=
0
,
.
vpad
=
0
};
.
hpad
=
0
,
.
vpad
=
0
};
/**********************
/**********************
...
@@ -265,7 +265,7 @@ static bool lv_rect_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
...
@@ -265,7 +265,7 @@ static bool lv_rect_design(lv_obj_t* obj_dp, const area_t * mask_p, lv_design_mo
{
{
/* Because of the radius it is not sure the area is covered*/
/* Because of the radius it is not sure the area is covered*/
if
(
mode
==
LV_DESIGN_COVER_CHK
)
{
if
(
mode
==
LV_DESIGN_COVER_CHK
)
{
if
(
LV_SA
(
obj_dp
,
lv_rects_t
)
->
objs
.
empty
!=
0
)
return
false
;
if
(
LV_SA
(
obj_dp
,
lv_rects_t
)
->
empty
!=
0
)
return
false
;
uint16_t
r
=
LV_SA
(
obj_dp
,
lv_rects_t
)
->
round
;
uint16_t
r
=
LV_SA
(
obj_dp
,
lv_rects_t
)
->
round
;
area_t
area_tmp
;
area_t
area_tmp
;
...
...
lv_objx/lv_rect.h
View file @
23ca4fdb
...
@@ -31,8 +31,9 @@ typedef struct
...
@@ -31,8 +31,9 @@ typedef struct
uint16_t
bwidth
;
uint16_t
bwidth
;
cord_t
hpad
;
cord_t
hpad
;
cord_t
vpad
;
cord_t
vpad
;
uint8_t
bopa
;
uint16_t
round
;
uint16_t
round
;
uint8_t
bopa
;
uint8_t
empty
:
1
;
}
lv_rects_t
;
}
lv_rects_t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment