Documentation ¶
Overview ¶
Package draw contains drawing procedures which defines grapical representations of several entities including gui elements, such as menu and also petri net components - places, transitions, arcs
Index ¶
- Constants
- Variables
- func Arc(ctx draw2d.GraphicContext, style Style, path []Pos, dir Direction, weight int)
- func Clean(ctx draw2d.GraphicContext, width, height int)
- func ExportBorder(ctx draw2d.GraphicContext)
- func InhibitorArc(ctx draw2d.GraphicContext, style Style, path []Pos)
- func Init(ctx draw2d.GraphicContext, width, height int)
- func Menu(ctx draw2d.GraphicContext, sWidth, sHeight int, itemsNames []string, ...) ([]float64, float64, float64)
- func Place(ctx draw2d.GraphicContext, style Style, pos Pos, n int, description string)
- func Splash(ctx draw2d.GraphicContext, title string)
- func Transition(ctx draw2d.GraphicContext, style Style, pos Pos, attrs, description string)
- type Direction
- type Drawer
- type Gravity
- type Pos
- type Style
Constants ¶
View Source
const ( DefaultStyle = Style(iota) HighlightedStyle FadedStyle )
View Source
const ( PLACE_RADIUS = 24.0 TRANSITION_WIDTH = 18.0 TRANSITION_HEIGHT = 72.0 )
Variables ¶
View Source
var ( WHITE = color.RGBA{255, 255, 255, 255} // #ffffff WHITISH = color.RGBA{239, 239, 239, 255} // #efefef LIGHT_GRAY = color.RGBA{204, 204, 204, 255} // #cccccc GRAY = color.RGBA{128, 128, 128, 255} // #808080 DARK_GRAY = color.RGBA{51, 51, 51, 255} // #333333 BLACKISH = color.RGBA{16, 16, 16, 255} // #101010 BLACK = color.RGBA{0, 0, 0, 255} // #000000 )
Functions ¶
func Clean ¶
func Clean(ctx draw2d.GraphicContext, width, height int)
func ExportBorder ¶
func ExportBorder(ctx draw2d.GraphicContext)
func InhibitorArc ¶
func InhibitorArc(ctx draw2d.GraphicContext, style Style, path []Pos)
func Init ¶
func Init(ctx draw2d.GraphicContext, width, height int)
func Splash ¶
func Splash(ctx draw2d.GraphicContext, title string)
func Transition ¶
func Transition(ctx draw2d.GraphicContext, style Style, pos Pos, attrs, description string)
Types ¶
Click to show internal directories.
Click to hide internal directories.