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

Function DrawPlus

plot/plots/shapes.go:110–118  ·  view source on GitHub ↗
(pc *paint.Context, pos math32.Vector2, size float32)

Source from the content-addressed store, hash-verified

108}
109
110func DrawPlus(pc *paint.Context, pos math32.Vector2, size float32) {
111 x := size * 1.05
112 pc.MoveTo(pos.X-x, pos.Y)
113 pc.LineTo(pos.X+x, pos.Y)
114 pc.MoveTo(pos.X, pos.Y-x)
115 pc.LineTo(pos.X, pos.Y+x)
116 pc.ClosePath()
117 pc.Stroke()
118}
119
120func DrawCross(pc *paint.Context, pos math32.Vector2, size float32) {
121 x := size * 0.9

Callers 1

DrawShapeFunction · 0.85

Calls 4

MoveToMethod · 0.80
LineToMethod · 0.80
ClosePathMethod · 0.80
StrokeMethod · 0.80

Tested by

no test coverage detected