Worked on text rendering
This commit is contained in:
parent
b80e2e5e75
commit
b174559a68
|
@ -87,16 +87,15 @@ impl AglApi for GraphicsRenderer {
|
||||||
.with_scale_and_position(scale as f32, point(coords.x as f32, coords.y as f32));
|
.with_scale_and_position(scale as f32, point(coords.x as f32, coords.y as f32));
|
||||||
// Draw it.
|
// Draw it.
|
||||||
if let Some(q) = font.outline_glyph(q_glyph) {
|
if let Some(q) = font.outline_glyph(q_glyph) {
|
||||||
|
// dbg!(q);
|
||||||
|
|
||||||
q.draw(|x, y, c| {
|
q.draw(|x, y, c| {
|
||||||
/* draw pixel `(x, y)` with coverage: `c` */
|
/* draw pixel `(x, y)` with coverage: `c` */
|
||||||
println!("h");
|
dbg!(x, y, c);
|
||||||
self.put_pixel(
|
|
||||||
Point {
|
let coordinates = x as u16 + (WIDTH as u16).wrapping_mul(y as u16);
|
||||||
x: x as u16,
|
|
||||||
y: y as u16,
|
self.buff[coordinates as usize] = color;
|
||||||
},
|
|
||||||
color,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue