MCPcopy Create free account
hub / github.com/cogentcore/core / constrainGeom

Method constrainGeom

core/windowgeometry.go:412–418  ·  view source on GitHub ↗

constrainGeom constrains geometry based on screen params

(sc *system.Screen)

Source from the content-addressed store, hash-verified

410
411// constrainGeom constrains geometry based on screen params
412func (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}

Callers 1

prefMethod · 0.80

Calls 1

ConstrainWinGeomMethod · 0.80

Tested by

no test coverage detected