示例#1
0
func (p *Path) bounds() s2.Rect {
	r := s2.EmptyRect()
	for _, ll := range p.Positions {
		r = r.AddPoint(ll)
	}
	return r
}
示例#2
0
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
}
示例#3
0
func (m *Marker) bounds() s2.Rect {
	r := s2.EmptyRect()
	r = r.AddPoint(m.Position)
	return r
}