Skip to content

Commit

Permalink
removing dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
gamirab committed Jul 26, 2024
1 parent 7ad92fe commit e5e56f6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/framebuffer/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ impl framebuffer::FramebufferDraw for core::Framebuffer {
let mut max_x = pos.x.ceil().max(0.0) as u32;

let components = col.to_rgb8();
// FOR TEXT BACKGROUND
//let c1 = f32::from(255 - components[0]);
//let c2 = f32::from(255 - components[1]);
//let c3 = f32::from(255 - components[2]);
let c1 = f32::from(255 - components[0]);
let c2 = f32::from(255 - components[1]);
let c3 = f32::from(255 - components[2]);
Expand Down Expand Up @@ -195,15 +191,11 @@ impl framebuffer::FramebufferDraw for core::Framebuffer {
}

glyph.draw(|x, y, v| {
// FOR TEXT BACKGROUND
//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,
},
// FOR TEXT BACKGROUND
//color::RGB((c1 * mult) as u8, (c2 * mult) as u8, (c3 * mult) as u8),
color::RGB(
(255.0 + (c1 - 255.0) * v) as u8,
(255.0 + (c2 - 255.0) * v) as u8,
Expand Down

0 comments on commit e5e56f6

Please sign in to comment.