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
de8f2942
Commit
de8f2942
authored
Jun 18, 2017
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img. draw bugfix
parent
79b07f84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
lv_draw.c
lv_draw/lv_draw.c
+3
-0
lv_draw_vbasic.c
lv_draw/lv_draw_vbasic.c
+6
-5
No files found.
lv_draw/lv_draw.c
View file @
de8f2942
...
...
@@ -360,6 +360,8 @@ void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
/*Round the coordinates with upscale*/
if
(
upscale
!=
false
)
{
if
((
mask_com
.
y1
&
0x1
)
!=
0
)
mask_com
.
y1
-=
1
;
/*Can be only even*/
if
((
mask_com
.
y2
&
0x1
)
==
0
)
mask_com
.
y2
-=
1
;
/*Can be only odd*/
if
((
mask_com
.
x1
&
0x1
)
!=
0
)
mask_com
.
x1
-=
1
;
/*Can be only even*/
if
((
mask_com
.
x2
&
0x1
)
==
0
)
mask_com
.
x2
-=
1
;
/*Can be only odd*/
}
...
...
@@ -399,6 +401,7 @@ void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
color_t
buf
[
LV_HOR_RES
];
for
(
row
=
mask_com
.
y1
;
row
<=
mask_com
.
y2
;
row
+=
us_val
)
{
res
=
fs_read
(
&
file
,
buf
,
useful_data
,
&
br
);
map_fp
(
&
line
,
&
mask_com
,
buf
,
style
->
opa
,
header
.
transp
,
upscale
,
style
->
ccolor
,
style
->
img_recolor
);
...
...
lv_draw/lv_draw_vbasic.c
View file @
de8f2942
...
...
@@ -295,9 +295,10 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
if
(
upscale
==
false
)
{
if
(
transp
==
false
)
{
/*Simply copy the pixels to the VDB*/
cord_t
row
;
cord_t
map_useful_w
=
area_get_width
(
&
masked_a
);
for
(
row
=
masked_a
.
y1
;
row
<=
masked_a
.
y2
;
row
++
)
{
sw_render_map_line
(
&
vdb_buf_tmp
[
masked_a
.
x1
],
&
map_p
[
masked_a
.
x1
],
map_
width
,
opa
);
sw_render_map_line
(
&
vdb_buf_tmp
[
masked_a
.
x1
],
&
map_p
[
masked_a
.
x1
],
map_
useful_w
,
opa
);
map_p
+=
map_width
;
/*Next row on the map*/
vdb_buf_tmp
+=
vdb_width
;
/*Next row on the VDB*/
}
...
...
@@ -375,10 +376,10 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
/*The most simple case (but upscale): 0 opacity, no recolor, no transp. pixels*/
if
(
transp
==
false
&&
opa
==
OPA_COVER
&&
recolor_opa
==
OPA_TRANSP
)
{
cord_t
map_col_start
=
masked_a
.
x1
>>
1
;
cord_t
map_col_end
=
masked_a
.
x2
>>
1
;
cord_t
map_col
;
cord_t
vdb_col
=
masked_a
.
x1
;
cord_t
map_col_start
=
masked_a
.
x1
>>
1
;
cord_t
map_col_end
=
masked_a
.
x2
>>
1
;
cord_t
map_col
;
cord_t
vdb_col
=
masked_a
.
x1
;
for
(
row
=
masked_a
.
y1
;
row
<=
masked_a
.
y2
;
row
++
)
{
map_col_start
=
masked_a
.
x1
>>
1
;
map_col_end
=
masked_a
.
x2
>>
1
;
...
...
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