Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed Mar 26, 2023
1 parent ea5fc91 commit 0a6c6fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/framebuffer/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ static void draw_logo(const struct logo_position *pos, const uint32_t size) {

const double x_start = center_x - radius;
const double x_end = center_x + radius;
for (uint32_t x = x_start + 1; x < x_end; x++) {
for (uint32_t x = x_start + 1; x < x_end; x++) { // TODO: why does this need to be + 1, probably because < instead of <=? since otherwise off by one on left side only
set_pixel(pos, x, y);
}
}

// BOTTOM CIRCLE
for (uint32_t y = transition_end_y; y < size; y++) {
// TODO: rename? this is local not global
const double center_y = size - bottom_radius - 1;
const double center_y = size - bottom_radius;
for (uint32_t x = 0; x < size; x++) {
if (((x - center_x) * (x - center_x)) + ((y - center_y) * (y - center_y)) <= (bottom_radius * bottom_radius)) {
set_pixel(pos, x, y);
Expand Down

0 comments on commit 0a6c6fd

Please sign in to comment.