Skip to content
Snippets Groups Projects
Verified Commit 497a0946 authored by Mateusz Zalega's avatar Mateusz Zalega Committed by rahix
Browse files

fix(gfx): Fix unwanted circle clipping

parent 1791d5cd
No related branches found
No related tags found
No related merge requests found
...@@ -127,8 +127,8 @@ void gfx_clear(struct gfx_region *reg) ...@@ -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) 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 y_ = y - r - t; y_ <= y + r + t; y_++) {
for (int x_ = x - r; x_ <= x + r; x_++) { for (int x_ = x - r - t; x_ <= x + r + t; x_++) {
int dx = (x_ - x) * (x_ - x); int dx = (x_ - x) * (x_ - x);
int dy = (y_ - y) * (y_ - y); int dy = (y_ - y) * (y_ - y);
int outer = (r + t) * (r + t); int outer = (r + t) * (r + t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment