doodle/pkg/drawtool/tools.go

34 lines
514 B
Go
Raw Normal View History

package drawtool
// Tool is a draw mode for an editable Canvas.
type Tool int
// Draw modes for editable Canvas.
const (
PencilTool Tool = iota // draw pixels where the mouse clicks
LineTool
RectTool
EllipseTool
ActorTool // drag and move actors
2019-06-09 00:02:28 +00:00
LinkTool
EraserTool
PanTool
TextTool
)
var toolNames = []string{
"Pencil",
"Line",
"Rectangle",
"Ellipse",
"Doodad", // readable name for ActorTool
2019-06-09 00:02:28 +00:00
"Link",
"Eraser",
"PanTool",
"TextTool",
}
func (t Tool) String() string {
return toolNames[t]
}