add scaling with hit test

This commit is contained in:
2025-07-05 16:41:43 +00:00
parent 3d41b56889
commit 7cfb9457a2
6 changed files with 177 additions and 75 deletions
+3 -3
View File
@@ -7,21 +7,21 @@ abstract class CanvasBackground {
/// draw the backround on this context. Implement this to have
/// different kinds of backgrounds
void paint(Canvas canvas, Size canvasSize);
void paint(Canvas canvas, Size canvasSize, double scale);
}
class NoBackground extends CanvasBackground {
const NoBackground();
@override
void paint(Canvas canvas, Size canvasSize) {}
void paint(Canvas canvas, Size canvasSize, double scale) {}
}
class SingleColorBackround extends CanvasBackground {
const SingleColorBackround(Color backgroundColor) : super(bgColor: backgroundColor);
@override
void paint(Canvas canvas, Size canvasSize) {
void paint(Canvas canvas, Size canvasSize, double scale) {
final paint = Paint()
..color = bgColor
..style = PaintingStyle.fill;