render

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appearance

type Appearance interface {
	DrawNode(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, n Node)
	DrawPad(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, p Pad)
	DrawEdge(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, e Edge)
}

Appearance represents an implementation which can display a flowchart.

type BasicRenderer

type BasicRenderer struct{}

func (*BasicRenderer) DrawEdge

func (renderer *BasicRenderer) DrawEdge(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, e Edge)

func (*BasicRenderer) DrawNode

func (r *BasicRenderer) DrawNode(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, n Node)

func (*BasicRenderer) DrawPad

func (renderer *BasicRenderer) DrawPad(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, p Pad)

type ColoredPad

type ColoredPad interface {
	PadColor() (float64, float64, float64)
}

ColoredPad describes a pad with a custom color.

type DecoratedNode

type DecoratedNode interface {
	NodeDecorator() NodeDecorator
}

DecoratedNode describes nodes which provide decoration information.

type DrawFunc added in v0.4.0

type DrawFunc func(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, x, y float64)

type Edge

type Edge interface {
	FromPos() (float64, float64)
	ToPos() (float64, float64)
	Edge() flow.Edge
}

type FocusableElement

type FocusableElement interface {
	Active() bool
}

FocusableElement types are elements which can be focused, and are drawn with a thicker outline if they are currently focused.

type HeadlineElement

type HeadlineElement interface {
	NodeHeadline() string
}

HeadlineElement describes nodes which have text labels which should be rendered.

type Node

type Node interface {
	Pos() (float64, float64)
	Node() flow.Node
}

type NodeDecorator added in v0.4.0

type NodeDecorator interface {
	NodeIcon() *gdk.Pixbuf
	NodeColor() (float64, float64, float64)
	NodeOverlayDraw() DrawFunc
}

NodeDecorator describes types which provide information about how to draw nodes.

type Pad

type Pad interface {
	Pos() (float64, float64)
	Pad() flow.Pad
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL