gvc

package
v0.0.10-0...-2b618bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRenderer

func RegisterRenderer(name string, renderer Renderer)

func SetFontFace

func SetFontFace(fn func(size float64) (font.Face, error))

Types

type Box

type Box struct {
	LL Point
	UR Point
}

type Boxf

type Boxf struct {
	LL Pointf
	UR Pointf
}

type Color

type Color struct {
	R uint
	G uint
	B uint
	A uint
}

type Context

type Context struct {
	*ccall.GVC
}

func New

func New() *Context

func (*Context) Close

func (c *Context) Close() error

func (*Context) FreeLayout

func (c *Context) FreeLayout(g *cgraph.Graph) error

func (*Context) Layout

func (c *Context) Layout(g *cgraph.Graph, engine string) error

func (*Context) RenderData

func (c *Context) RenderData(g *cgraph.Graph, format string, w io.Writer) error

func (*Context) RenderFilename

func (c *Context) RenderFilename(g *cgraph.Graph, format, filename string) error

func (*Context) RenderImage

func (c *Context) RenderImage(g *cgraph.Graph, format string) (image.Image, error)

type DefaultRenderer

type DefaultRenderer struct{}

func (*DefaultRenderer) BeginAnchor

func (*DefaultRenderer) BeginAnchor(job *Job, href, tooltip, target, id string) error

func (*DefaultRenderer) BeginCluster

func (*DefaultRenderer) BeginCluster(job *Job) error

func (*DefaultRenderer) BeginEdge

func (*DefaultRenderer) BeginEdge(job *Job) error

func (*DefaultRenderer) BeginEdges

func (*DefaultRenderer) BeginEdges(job *Job) error

func (*DefaultRenderer) BeginGraph

func (*DefaultRenderer) BeginGraph(job *Job) error

func (*DefaultRenderer) BeginJob

func (*DefaultRenderer) BeginJob(job *Job) error

func (*DefaultRenderer) BeginLabel

func (*DefaultRenderer) BeginLabel(job *Job, typ int) error

func (*DefaultRenderer) BeginLayer

func (*DefaultRenderer) BeginLayer(job *Job, layerName string, layerNum int, numLayers int) error

func (*DefaultRenderer) BeginNode

func (*DefaultRenderer) BeginNode(job *Job) error

func (*DefaultRenderer) BeginNodes

func (*DefaultRenderer) BeginNodes(job *Job) error

func (*DefaultRenderer) BeginPage

func (*DefaultRenderer) BeginPage(job *Job) error

func (*DefaultRenderer) BezierCurve

func (*DefaultRenderer) BezierCurve(job *Job, a []Pointf, arrowAtStart, arrowAtEnd int) error

func (*DefaultRenderer) Comment

func (*DefaultRenderer) Comment(job *Job, comment string) error

func (*DefaultRenderer) Ellipse

func (*DefaultRenderer) Ellipse(job *Job, a0, a1 Pointf, filled int) error

func (*DefaultRenderer) EndAnchor

func (*DefaultRenderer) EndAnchor(job *Job) error

func (*DefaultRenderer) EndCluster

func (*DefaultRenderer) EndCluster(job *Job) error

func (*DefaultRenderer) EndEdge

func (*DefaultRenderer) EndEdge(job *Job) error

func (*DefaultRenderer) EndEdges

func (*DefaultRenderer) EndEdges(job *Job) error

func (*DefaultRenderer) EndGraph

func (*DefaultRenderer) EndGraph(job *Job) error

func (*DefaultRenderer) EndJob

func (*DefaultRenderer) EndJob(job *Job) error

func (*DefaultRenderer) EndLabel

func (*DefaultRenderer) EndLabel(job *Job) error

func (*DefaultRenderer) EndLayer

func (*DefaultRenderer) EndLayer(job *Job) error

func (*DefaultRenderer) EndNode

func (*DefaultRenderer) EndNode(job *Job) error

func (*DefaultRenderer) EndNodes

func (*DefaultRenderer) EndNodes(job *Job) error

func (*DefaultRenderer) EndPage

func (*DefaultRenderer) EndPage(job *Job) error

func (*DefaultRenderer) LibraryShape

func (*DefaultRenderer) LibraryShape(job *Job, name string, a []Pointf, filled int) error

func (*DefaultRenderer) Polygon

func (*DefaultRenderer) Polygon(job *Job, a []Pointf, filled int) error

func (*DefaultRenderer) Polyline

func (*DefaultRenderer) Polyline(job *Job, a []Pointf) error

func (*DefaultRenderer) ResolveColor

func (*DefaultRenderer) ResolveColor(job *Job, c Color) error

func (*DefaultRenderer) TextSpan

func (*DefaultRenderer) TextSpan(job *Job, p Pointf, span *TextSpan) error

type ImageRenderer

type ImageRenderer struct {
	*DefaultRenderer
	// contains filtered or unexported fields
}

func (*ImageRenderer) BeginPage

func (r *ImageRenderer) BeginPage(job *Job) error

func (*ImageRenderer) BezierCurve

func (r *ImageRenderer) BezierCurve(job *Job, a []Pointf, arrowAtStart, arrowAtEnd int) error

func (*ImageRenderer) Ellipse

func (r *ImageRenderer) Ellipse(job *Job, a0, a1 Pointf, filled int) error

func (*ImageRenderer) EndPage

func (r *ImageRenderer) EndPage(job *Job) error

func (*ImageRenderer) Polygon

func (r *ImageRenderer) Polygon(job *Job, a []Pointf, filled int) error

func (*ImageRenderer) Polyline

func (r *ImageRenderer) Polyline(job *Job, a []Pointf) error

func (*ImageRenderer) SetFontFace

func (r *ImageRenderer) SetFontFace(fn func(size float64) (font.Face, error))

func (*ImageRenderer) TextSpan

func (r *ImageRenderer) TextSpan(job *Job, p Pointf, span *TextSpan) error

type Job

type Job struct {
	*ccall.GVJ
}

type Point

type Point struct {
	X int
	Y int
}

type Pointf

type Pointf struct {
	X float64
	Y float64
}

type Renderer

type Renderer interface {
	BeginJob(*Job) error
	EndJob(*Job) error
	BeginGraph(*Job) error
	EndGraph(*Job) error
	BeginLayer(*Job, string, int, int) error
	EndLayer(*Job) error
	BeginPage(*Job) error
	EndPage(*Job) error
	BeginCluster(*Job) error
	EndCluster(*Job) error
	BeginNodes(*Job) error
	EndNodes(*Job) error
	BeginEdges(*Job) error
	EndEdges(*Job) error
	BeginNode(*Job) error
	EndNode(*Job) error
	BeginEdge(*Job) error
	EndEdge(*Job) error
	BeginAnchor(*Job, string, string, string, string) error
	EndAnchor(*Job) error
	BeginLabel(*Job, int) error
	EndLabel(*Job) error
	TextSpan(*Job, Pointf, *TextSpan) error
	ResolveColor(*Job, Color) error
	Ellipse(*Job, Pointf, Pointf, int) error
	Polygon(*Job, []Pointf, int) error
	BezierCurve(*Job, []Pointf, int, int) error
	Polyline(*Job, []Pointf) error
	Comment(*Job, string) error
	LibraryShape(*Job, string, []Pointf, int) error
}

type TextSpan

type TextSpan struct {
	*ccall.TextSpan
}

Jump to

Keyboard shortcuts

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