switch size data types to u16

The binary protocol is limited to using u16's so limit everything to that.
This commit is contained in:
Johann150
2023-12-28 16:18:50 +01:00
parent f9c13ad78d
commit 04f54936b9
8 changed files with 32 additions and 27 deletions

View File

@@ -11,7 +11,7 @@ use rect::Rect;
pub struct Painter {
client: Option<Client>,
area: Rect,
offset: (u32, u32),
offset: (u16, u16),
image: Option<DynamicImage>,
}
@@ -20,7 +20,7 @@ impl Painter {
pub fn new(
client: Option<Client>,
area: Rect,
offset: (u32, u32),
offset: (u16, u16),
image: Option<DynamicImage>,
) -> Painter {
Painter {
@@ -62,7 +62,7 @@ impl Painter {
}
// Get the pixel at this location
let pixel = image.get_pixel(x, y);
let pixel = image.get_pixel(x as u32, y as u32);
// Get the channels
let channels = pixel.channels();