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
20af4072
Commit
20af4072
authored
May 13, 2017
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor object updates with some object types
parent
da1f4e8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
17 deletions
+47
-17
lv_chart.c
lv_objx/lv_chart.c
+44
-14
lv_led.c
lv_objx/lv_led.c
+1
-1
lv_page.c
lv_objx/lv_page.c
+2
-2
No files found.
lv_objx/lv_chart.c
View file @
20af4072
...
...
@@ -402,28 +402,58 @@ static void lv_chart_draw_div(lv_obj_t * chart, const area_t * mask)
lv_style_t
*
style
=
lv_obj_get_style
(
chart
);
uint8_t
div_i
;
uint8_t
div_i_end
;
uint8_t
div_i_start
;
point_t
p1
;
point_t
p2
;
cord_t
w
=
lv_obj_get_width
(
chart
);
cord_t
h
=
lv_obj_get_height
(
chart
);
cord_t
x_ofs
=
chart
->
cords
.
x1
;
cord_t
y_ofs
=
chart
->
cords
.
y1
;
p1
.
x
=
0
+
x_ofs
;
p2
.
x
=
w
+
x_ofs
;
for
(
div_i
=
1
;
div_i
<=
ext
->
hdiv_num
;
div_i
++
)
{
p1
.
y
=
(
int32_t
)((
int32_t
)
h
*
div_i
)
/
(
ext
->
hdiv_num
+
1
);
p1
.
y
+=
y_ofs
;
p2
.
y
=
p1
.
y
;
lv_draw_line
(
&
p1
,
&
p2
,
mask
,
style
);
if
(
ext
->
hdiv_num
!=
0
)
{
/*Draw slide lines if no border*/
if
(
style
->
bwidth
!=
0
)
{
div_i_start
=
1
;
div_i_end
=
ext
->
hdiv_num
;
}
else
{
div_i_start
=
0
;
div_i_end
=
ext
->
hdiv_num
+
1
;
}
p1
.
x
=
0
+
x_ofs
;
p2
.
x
=
w
+
x_ofs
;
for
(
div_i
=
div_i_start
;
div_i
<=
div_i_end
;
div_i
++
)
{
p1
.
y
=
(
int32_t
)((
int32_t
)
h
*
div_i
)
/
(
ext
->
hdiv_num
+
1
);
p1
.
y
+=
y_ofs
;
if
(
div_i
==
div_i_start
)
p1
.
y
+=
(
style
->
line_width
>>
1
)
+
1
;
/*The first line might not be visible*/
if
(
div_i
==
div_i_end
)
p1
.
y
-=
(
style
->
line_width
>>
1
)
+
1
;
/*The last line might not be visible*/
p2
.
y
=
p1
.
y
;
lv_draw_line
(
&
p1
,
&
p2
,
mask
,
style
);
}
}
p1
.
y
=
0
+
y_ofs
;
p2
.
y
=
h
+
y_ofs
;
for
(
div_i
=
1
;
div_i
<=
ext
->
vdiv_num
;
div_i
++
)
{
p1
.
x
=
(
int32_t
)((
int32_t
)
w
*
div_i
)
/
(
ext
->
vdiv_num
+
1
);
p1
.
x
+=
x_ofs
;
p2
.
x
=
p1
.
x
;
lv_draw_line
(
&
p1
,
&
p2
,
mask
,
style
);
if
(
ext
->
vdiv_num
!=
0
)
{
/*Draw slide lines if no border*/
if
(
style
->
bwidth
!=
0
)
{
div_i_start
=
1
;
div_i_end
=
ext
->
vdiv_num
;
}
else
{
div_i_start
=
0
;
div_i_end
=
ext
->
vdiv_num
+
1
;
}
p1
.
y
=
0
+
y_ofs
;
p2
.
y
=
h
+
y_ofs
;
for
(
div_i
=
div_i_start
;
div_i
<=
div_i_end
;
div_i
++
)
{
p1
.
x
=
(
int32_t
)((
int32_t
)
w
*
div_i
)
/
(
ext
->
vdiv_num
+
1
);
p1
.
x
+=
x_ofs
;
if
(
div_i
==
div_i_start
)
p1
.
x
+=
(
style
->
line_width
>>
1
)
+
1
;
/*The first line might not be visible*/
if
(
div_i
==
div_i_end
)
p1
.
x
-=
(
style
->
line_width
>>
1
)
+
1
;
/*The last line might not be visible*/
p2
.
x
=
p1
.
x
;
lv_draw_line
(
&
p1
,
&
p2
,
mask
,
style
);
}
}
}
...
...
lv_objx/lv_led.c
View file @
20af4072
...
...
@@ -17,7 +17,7 @@
*********************/
#define LV_LED_WIDTH_DEF (LV_DPI / 3)
#define LV_LED_HEIGHT_DEF (LV_DPI / 3)
#define LV_LED_BRIGHT_OFF 1
28
#define LV_LED_BRIGHT_OFF 1
00
#define LV_LED_BRIGHT_ON 255
/**********************
...
...
lv_objx/lv_page.c
View file @
20af4072
...
...
@@ -69,7 +69,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
ext
->
sbh_draw
=
0
;
ext
->
sbv_draw
=
0
;
ext
->
style_sb
=
lv_style_get
(
LV_STYLE_PRETTY
,
NULL
);
ext
->
sb_width
=
LV_DPI
/
8
;
ext
->
sb_width
=
LV_DPI
/
8
;
/*Will be modified later*/
ext
->
sb_mode
=
LV_PAGE_SB_MODE_ON
;
if
(
ancestor_design_f
==
NULL
)
ancestor_design_f
=
lv_obj_get_design_f
(
new_page
);
...
...
@@ -85,7 +85,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
lv_cont_set_fit
(
ext
->
scrl
,
true
,
true
);
lv_obj_set_style
(
ext
->
scrl
,
lv_style_get
(
LV_STYLE_PRETTY
,
NULL
));
lv_page_set_sb_width
(
new_page
,
ext
->
sb_width
);
lv_page_set_sb_width
(
new_page
,
style
->
hpad
);
lv_page_set_sb_mode
(
new_page
,
ext
->
sb_mode
);
lv_page_set_style_sb
(
new_page
,
ext
->
style_sb
);
...
...
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