fix first column and firt line not drawable

- within() method should include first point and exclude last.
This commit is contained in:
philippe lhardy
2022-04-17 13:36:35 +02:00
parent 43e69b7ff8
commit 744999802c

View File

@@ -92,7 +92,8 @@ public class Position
} }
} }
/** WARNING [(a,b),(width,height)[ */
public boolean within(int a, int b, int width, int height) { public boolean within(int a, int b, int width, int height) {
return ((x > a) && (x < width) && (y > b) && (y < height)); return ((x >= a) && (x < width) && (y >= b) && (y < height));
} }
} }