simple view layer: static screenspace widgets with working hittest

This commit is contained in:
2025-07-01 03:49:45 +00:00
parent 4535894dc4
commit a7ea05c00d
2 changed files with 59 additions and 110 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, Offset offset, double scale, Size canvasSize);
void paint(Canvas canvas, Size canvasSize);
}
class NoBackground extends CanvasBackground {
const NoBackground();
@override
void paint(Canvas canvas, Offset offset, double scale, Size canvasSize) {}
void paint(Canvas canvas, Size canvasSize) {}
}
class SingleColorBackround extends CanvasBackground {
const SingleColorBackround(Color backgroundColor) : super(bgColor: backgroundColor);
@override
void paint(Canvas canvas, Offset offset, double scale, Size canvasSize) {
void paint(Canvas canvas, Size canvasSize) {
final paint = Paint()
..color = bgColor
..style = PaintingStyle.fill;