MCPcopy Create free account
hub / github.com/fogleman/primitive / bounds

Method bounds

primitive/rectangle.go:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func (r *Rectangle) bounds() (x1, y1, x2, y2 int) {
26 x1, y1 = r.X1, r.Y1
27 x2, y2 = r.X2, r.Y2
28 if x1 > x2 {
29 x1, x2 = x2, x1
30 }
31 if y1 > y2 {
32 y1, y2 = y2, y1
33 }
34 return
35}
36
37func (r *Rectangle) Draw(dc *gg.Context, scale float64) {
38 x1, y1, x2, y2 := r.bounds()

Callers 3

DrawMethod · 0.95
SVGMethod · 0.95
RasterizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected