Skip to content

Commit

Permalink
Revert "More intuitive color use for the draw_text function (#123)"
Browse files Browse the repository at this point in the history
This reverts commit 6f8099d.
  • Loading branch information
bkirwi committed Sep 9, 2024
1 parent f210805 commit af54631
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/framebuffer/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,13 @@ impl framebuffer::FramebufferDraw for core::Framebuffer {
}

glyph.draw(|x, y, v| {
let mult = (1.0 - v).min(1.0);
self.write_pixel(
Point2 {
x: (x + bounding_box.min.x as u32) as i32,
y: (y + bounding_box.min.y as u32) as i32,
},
color::RGB(
(255.0 + (c1 - 255.0) * v) as u8,
(255.0 + (c2 - 255.0) * v) as u8,
(255.0 + (c3 - 255.0) * v) as u8,
),
color::RGB((c1 * mult) as u8, (c2 * mult) as u8, (c3 * mult) as u8),
)
});
}
Expand Down

0 comments on commit af54631

Please sign in to comment.