render

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 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 {
	DrawNode(da *gtk.DrawingArea, cr *cairo.Context, animStep int64, x, y float64)
}

DecoratedNode describes nodes which can draw decorations or UI over themselves.

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 IconNode

type IconNode interface {
	NodeIcon() *gdk.Pixbuf
}

IconNode describes nodes which have an icon, and need to be rendered in their center.

type Node

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

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