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
1b1efbd0
Commit
1b1efbd0
authored
Mar 07, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_area_is_on bugfix
parent
d068c85e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
39 deletions
+13
-39
lv_draw_vbasic.c
lv_draw/lv_draw_vbasic.c
+3
-0
lv_area.c
lv_misc/lv_area.c
+10
-39
No files found.
lv_draw/lv_draw_vbasic.c
View file @
1b1efbd0
...
@@ -142,6 +142,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
...
@@ -142,6 +142,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
else
if
(
lv_area_get_height
(
&
vdb_rel_a
)
>
VFILL_HW_ACC_SIZE_LIMIT
&&
else
if
(
lv_area_get_height
(
&
vdb_rel_a
)
>
VFILL_HW_ACC_SIZE_LIMIT
&&
lv_disp_is_mem_blend_supported
())
lv_disp_is_mem_blend_supported
())
{
{
/*Fill a one line sized buffer with a color and blend this later*/
if
(
color_array_tmp
[
0
].
full
!=
color
.
full
||
last_width
!=
w
)
{
if
(
color_array_tmp
[
0
].
full
!=
color
.
full
||
last_width
!=
w
)
{
uint16_t
i
;
uint16_t
i
;
for
(
i
=
0
;
i
<
w
;
i
++
)
{
for
(
i
=
0
;
i
<
w
;
i
++
)
{
...
@@ -149,6 +150,8 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
...
@@ -149,6 +150,8 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
}
}
last_width
=
w
;
last_width
=
w
;
}
}
/*Blend the filled line to every line VDB line-by-line*/
lv_coord_t
row
;
lv_coord_t
row
;
for
(
row
=
vdb_rel_a
.
y1
;
row
<=
vdb_rel_a
.
y2
;
row
++
)
{
for
(
row
=
vdb_rel_a
.
y1
;
row
<=
vdb_rel_a
.
y2
;
row
++
)
{
lv_disp_mem_blend
(
&
vdb_buf_tmp
[
vdb_rel_a
.
x1
],
color_array_tmp
,
w
,
opa
);
lv_disp_mem_blend
(
&
vdb_buf_tmp
[
vdb_rel_a
.
x1
],
color_array_tmp
,
w
,
opa
);
...
...
lv_misc/lv_area.c
View file @
1b1efbd0
...
@@ -166,45 +166,16 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p)
...
@@ -166,45 +166,16 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p)
*/
*/
bool
lv_area_is_on
(
const
lv_area_t
*
a1_p
,
const
lv_area_t
*
a2_p
)
bool
lv_area_is_on
(
const
lv_area_t
*
a1_p
,
const
lv_area_t
*
a2_p
)
{
{
/*Two area are on each other if... */
if
((
a1_p
->
x1
<=
a2_p
->
x2
)
&&
(
a1_p
->
x2
>=
a2_p
->
x1
)
&&
lv_point_t
p
;
(
a1_p
->
y1
<=
a2_p
->
y2
)
&&
/*a2 left-top corner is on a1*/
(
a1_p
->
y2
>=
a2_p
->
y1
))
p
.
x
=
a2_p
->
x1
;
{
p
.
y
=
a2_p
->
y1
;
return
true
;
if
(
lv_area_is_point_on
(
a1_p
,
&
p
))
return
true
;
}
else
{
return
false
;
/*a2 right-top corner is on a1*/
}
p
.
x
=
a2_p
->
x2
;
p
.
y
=
a2_p
->
y1
;
if
(
lv_area_is_point_on
(
a1_p
,
&
p
))
return
true
;
/*a2 left-bottom corner is on a1*/
p
.
x
=
a2_p
->
x1
;
p
.
y
=
a2_p
->
y2
;
if
(
lv_area_is_point_on
(
a1_p
,
&
p
))
return
true
;
/*a2 right-bottom corner is on a1*/
p
.
x
=
a2_p
->
x2
;
p
.
y
=
a2_p
->
y2
;
if
(
lv_area_is_point_on
(
a1_p
,
&
p
))
return
true
;
/*a2 is horizontally bigger then a1 and covers it*/
if
((
a2_p
->
x1
<=
a1_p
->
x1
&&
a2_p
->
x2
>=
a1_p
->
x2
)
&&
/*a2 hor. cover a1?*/
((
a2_p
->
y1
<=
a1_p
->
y1
&&
a2_p
->
y1
>=
a1_p
->
y2
)
||
/*upper edge is on a1?*/
(
a2_p
->
y2
<=
a1_p
->
y1
&&
a2_p
->
y2
>=
a1_p
->
y2
)
||
/* or lower edge is on a1?*/
(
a2_p
->
y1
<=
a1_p
->
y1
&&
a2_p
->
y2
>=
a1_p
->
y2
)))
/*or a2 vert bigger then a1*/
return
true
;
/*a2 is vertically bigger then a1 and covers it*/
if
((
a2_p
->
y1
<=
a1_p
->
y1
&&
a2_p
->
y2
>=
a1_p
->
y2
)
&&
/*a2 vert. cover a1?*/
((
a2_p
->
x1
<=
a1_p
->
x1
&&
a2_p
->
x1
>=
a1_p
->
x2
)
||
/*left edge is on a1?*/
(
a2_p
->
x2
<=
a1_p
->
x1
&&
a2_p
->
x2
>=
a1_p
->
x2
)
||
/* or right edge is on a1?*/
(
a2_p
->
x1
<=
a1_p
->
x1
&&
a2_p
->
x2
>=
a1_p
->
x2
)))
/*or a2 hor. bigger then a1*/
return
true
;
/*Else no cover*/
return
false
;
}
}
/**
/**
...
...
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