(Optional<Drawing> drawing, Window.MouseState after)
| 168 | } |
| 169 | |
| 170 | private void fixDrawingSpace(Optional<Drawing> drawing, Window.MouseState after) { |
| 171 | Vec2 af = drawing.map(x -> x.windowSystemToDrawingSystem(new Vec2(after.x, after.y))) |
| 172 | .get(); |
| 173 | |
| 174 | after.mx = af.x; |
| 175 | after.my = af.y; |
| 176 | |
| 177 | Vec2 daf = drawing.map(x -> x.windowSystemToDrawingSystemDelta(new Vec2(after.dx, after.dy))) |
| 178 | .get(); |
| 179 | |
| 180 | after.mdx = daf.x; |
| 181 | after.mdy = daf.y; |
| 182 | |
| 183 | } |
| 184 | |
| 185 | public interface Dragger { |
| 186 | boolean update(Window.Event<Window.MouseState> e, boolean termination); |
no test coverage detected