func (p *Path) bounds() s2.Rect { r := s2.EmptyRect() for _, ll := range p.Positions { r = r.AddPoint(ll) } return r }
func (m *Context) determineBounds() s2.Rect { r := s2.EmptyRect() for _, marker := range m.markers { r = r.Union(marker.bounds()) } for _, path := range m.paths { r = r.Union(path.bounds()) } for _, area := range m.areas { r = r.Union(area.bounds()) } return r }
func (m *Marker) bounds() s2.Rect { r := s2.EmptyRect() r = r.AddPoint(m.Position) return r }