2011-04-27 08:06:14 +00:00
|
|
|
// Copyright 2010 The draw2d Authors. All rights reserved.
|
|
|
|
// created: 21/11/2010 by Laurent Le Goff
|
2012-04-17 09:03:56 +00:00
|
|
|
|
2011-04-27 08:06:14 +00:00
|
|
|
package draw2d
|
|
|
|
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexCommand defines different commands to describe the vertex of a path.
|
2011-04-27 08:06:14 +00:00
|
|
|
type VertexCommand byte
|
|
|
|
|
|
|
|
const (
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexNoCommand does nothing
|
2011-04-27 08:06:14 +00:00
|
|
|
VertexNoCommand VertexCommand = iota
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexStartCommand starts a (sub)path
|
2011-04-27 08:06:14 +00:00
|
|
|
VertexStartCommand
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexJoinCommand joins the two edges at the vertex
|
2011-04-27 08:06:14 +00:00
|
|
|
VertexJoinCommand
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexCloseCommand closes the subpath
|
2011-04-27 08:06:14 +00:00
|
|
|
VertexCloseCommand
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexStopCommand is the endpoint of the path.
|
2011-04-27 08:06:14 +00:00
|
|
|
VertexStopCommand
|
|
|
|
)
|
|
|
|
|
2015-07-10 14:58:36 +00:00
|
|
|
// VertexConverter allows to convert vertices.
|
2011-04-27 08:06:14 +00:00
|
|
|
type VertexConverter interface {
|
|
|
|
NextCommand(cmd VertexCommand)
|
|
|
|
Vertex(x, y float64)
|
|
|
|
}
|