Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
4050f386
Commit
4050f386
authored
Dec 29, 2021
by
Rahix
Browse files
Code Style
parent
dd2dc2c1
Pipeline
#5446
passed with stages
in 2 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pycardium/modules/ctx.c
View file @
4050f386
...
...
@@ -341,7 +341,9 @@ static mp_obj_t mp_ctx_add_stop(size_t n_args, const mp_obj_t *args)
green
=
mp_obj_get_float
(
green_in
);
blue
=
mp_obj_get_float
(
blue_in
);
ctx_gradient_add_stop
(
self
->
ctx
,
pos
,
red
,
green
,
blue
,
alpha_f
);
ctx_gradient_add_stop
(
self
->
ctx
,
pos
,
red
,
green
,
blue
,
alpha_f
);
}
else
{
uint8_t
red
,
green
,
blue
,
alpha
;
red
=
mp_obj_get_int
(
red_in
);
...
...
@@ -349,7 +351,9 @@ static mp_obj_t mp_ctx_add_stop(size_t n_args, const mp_obj_t *args)
blue
=
mp_obj_get_int
(
blue_in
);
alpha
=
(
int
)(
alpha_f
*
255
.
0
);
ctx_gradient_add_stop_u8
(
self
->
ctx
,
pos
,
red
,
green
,
blue
,
alpha
);
ctx_gradient_add_stop_u8
(
self
->
ctx
,
pos
,
red
,
green
,
blue
,
alpha
);
}
return
MP_OBJ_FROM_PTR
(
self
);
...
...
Write
Preview
Supports
Markdown
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