CardRectToGrid converts the card's rectangle to two absolute grid points representing the card's extents in absolute grid spaces. func (grid *Grid) CardRectToGrid(rect *sdl.FRect) []Point { return []Point{ {grid.LockPosition(rect.X), grid.LockPosition(rect.Y)}, {grid.LockPosition(rect.X + rect.
(rect *sdl.FRect)
| 296 | // } |
| 297 | |
| 298 | func (grid *Grid) Select(rect *sdl.FRect) GridSelection { |
| 299 | |
| 300 | return NewGridSelection( |
| 301 | grid.LockPosition(rect.X), |
| 302 | grid.LockPosition(rect.Y), |
| 303 | grid.LockPosition(rect.X+rect.W), |
| 304 | grid.LockPosition(rect.Y+rect.H), |
| 305 | grid, |
| 306 | ) |
| 307 | |
| 308 | } |
| 309 | |
| 310 | func (grid *Grid) LockPosition(position float32) float32 { |
| 311 |
no test coverage detected