Commit eba63104 authored by Astro's avatar Astro

l0dable: update display coordinate types

parent e59a45a1
......@@ -116,7 +116,7 @@ impl Display {
/// Print text
///
/// s must be 0-terminated
pub fn print(&self, x: u16, y: u16, s: &[u8], fg: Color, bg: Color) {
pub fn print(&self, x: i16, y: i16, s: &[u8], fg: Color, bg: Color) {
unsafe {
epic_disp_print(x, y, s.as_ptr(), fg.0, bg.0);
}
......@@ -125,14 +125,14 @@ impl Display {
/// Print text with a selected font
///
/// s must be 0-terminated
pub fn print_adv(&self, font: Font, x: u16, y: u16, s: &[u8], fg: Color, bg: Color) {
pub fn print_adv(&self, font: Font, x: i16, y: i16, s: &[u8], fg: Color, bg: Color) {
unsafe {
epic_disp_print_adv(font as u8, x, y, s.as_ptr(), fg.0, bg.0);
}
}
/// Set a pixel
pub fn pixel(&self, x: u16, y: u16, color: Color) {
pub fn pixel(&self, x: i16, y: i16, color: Color) {
unsafe {
epic_disp_pixel(x, y, color.0);
}
......@@ -141,10 +141,10 @@ impl Display {
/// Draw a line
pub fn line(
&self,
x1: u16,
y1: u16,
x2: u16,
y2: u16,
x1: i16,
y1: i16,
x2: i16,
y2: i16,
color: Color,
linestyle: LineStyle,
pixelsize: u16,
......@@ -156,10 +156,10 @@ impl Display {
pub fn rect(
&self,
x1: u16,
y1: u16,
x2: u16,
y2: u16,
x1: i16,
y1: i16,
x2: i16,
y2: i16,
color: Color,
fillstyle: FillStyle,
pixelsize: u16,
......@@ -172,8 +172,8 @@ impl Display {
/// Draw a circle
pub fn circ(
&self,
x: u16,
y: u16,
x: i16,
y: i16,
rad: u16,
color: Color,
fillstyle: FillStyle,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment