constrainGeom constrains geometry based on screen params
(sc *system.Screen)
| 410 | |
| 411 | // constrainGeom constrains geometry based on screen params |
| 412 | func (wg *windowGeometry) constrainGeom(sc *system.Screen) { |
| 413 | sz, pos := sc.ConstrainWinGeom(image.Point{wg.SX, wg.SY}, image.Point{wg.PX, wg.PY}) |
| 414 | wg.SX = sz.X |
| 415 | wg.SY = sz.Y |
| 416 | wg.PX = pos.X |
| 417 | wg.PY = pos.Y |
| 418 | } |