Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fleur
firmware
Commits
497a0946
Verified
Commit
497a0946
authored
Aug 15, 2019
by
Mateusz Zalega
Committed by
Rahix
Aug 15, 2019
Browse files
fix(gfx): Fix unwanted circle clipping
Signed-off-by:
Mateusz Zalega
<
mateusz@appliedsourcery.com
>
parent
1791d5cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/gfx/gfx.c
View file @
497a0946
...
...
@@ -127,8 +127,8 @@ void gfx_clear(struct gfx_region *reg)
void
gfx_circle
(
struct
gfx_region
*
reg
,
int
x
,
int
y
,
int
r
,
int
t
,
Color
c
)
{
for
(
int
y_
=
y
-
r
;
y_
<=
y
+
r
;
y_
++
)
{
for
(
int
x_
=
x
-
r
;
x_
<=
x
+
r
;
x_
++
)
{
for
(
int
y_
=
y
-
r
-
t
;
y_
<=
y
+
r
+
t
;
y_
++
)
{
for
(
int
x_
=
x
-
r
-
t
;
x_
<=
x
+
r
+
t
;
x_
++
)
{
int
dx
=
(
x_
-
x
)
*
(
x_
-
x
);
int
dy
=
(
y_
-
y
)
*
(
y_
-
y
);
int
outer
=
(
r
+
t
)
*
(
r
+
t
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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