couple view and controller + offset working

This commit is contained in:
2025-07-02 01:21:45 +00:00
parent a7ea05c00d
commit 0e4125a583
5 changed files with 149 additions and 24 deletions
+11
View File
@@ -0,0 +1,11 @@
import 'dart:ui';
/// Convert grid space coordinates to screen space coordinates
Offset gsToSs(Offset gsPosition, Offset gsTopLeft) {
return gsPosition - gsTopLeft;
}
/// Convert screen space coordinates to grid space coordinates
Offset ssToGs(Offset ssPosition, Offset gsTopLeft) {
return ssPosition + gsTopLeft;
}