|
|
@@ -56,4 +56,25 @@ func Draw(c *canvas.Canvas, point Point, face *canvas.FontFace, debug bool) { |
|
|
|
|
|
|
|
|
text := canvas.NewTextLine(face, point.Name(), canvas.Bottom) |
|
|
text := canvas.NewTextLine(face, point.Name(), canvas.Bottom) |
|
|
c.RenderText(text, m.Translate(2, -4)) |
|
|
c.RenderText(text, m.Translate(2, -4)) |
|
|
|
|
|
|
|
|
|
|
|
if debug { |
|
|
|
|
|
yStyle := canvas.Style{ |
|
|
|
|
|
Fill: canvas.Paint{}, |
|
|
|
|
|
Stroke: canvas.Paint{Color: canvas.Green}, |
|
|
|
|
|
StrokeWidth: 0.2, |
|
|
|
|
|
StrokeCapper: canvas.RoundCap, |
|
|
|
|
|
StrokeJoiner: canvas.BevelJoin, |
|
|
|
|
|
} |
|
|
|
|
|
yLine := canvas.Line(0, 10) |
|
|
|
|
|
xStyle := canvas.Style{ |
|
|
|
|
|
Fill: canvas.Paint{}, |
|
|
|
|
|
Stroke: canvas.Paint{Color: canvas.Red}, |
|
|
|
|
|
StrokeWidth: 0.2, |
|
|
|
|
|
StrokeCapper: canvas.RoundCap, |
|
|
|
|
|
StrokeJoiner: canvas.BevelJoin, |
|
|
|
|
|
} |
|
|
|
|
|
xLine := canvas.Line(10, 0) |
|
|
|
|
|
c.RenderPath(yLine, yStyle, m) |
|
|
|
|
|
c.RenderPath(xLine, xStyle, m) |
|
|
|
|
|
} |
|
|
} |
|
|
} |