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

Method winBBox

core/render.go:429–435  ·  view source on GitHub ↗

winBBox returns the RenderWindow based bounding box for the widget by adding the Scene position to the ScBBox

()

Source from the content-addressed store, hash-verified

427// winBBox returns the RenderWindow based bounding box for the widget
428// by adding the Scene position to the ScBBox
429func (wb *WidgetBase) winBBox() image.Rectangle {
430 bb := wb.Geom.TotalBBox
431 if wb.Scene != nil {
432 return bb.Add(wb.Scene.sceneGeom.Pos)
433 }
434 return bb
435}
436
437// winPos returns the RenderWindow based position within the
438// bounding box of the widget, where the x, y coordinates

Callers 3

winPosMethod · 0.95
DefaultTooltipPosMethod · 0.95
newTooltipFunction · 0.80

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected