cg

package module
v0.0.0-...-258bc25 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func CreateImageContext

func CreateImageContext(f C.cairo_format_t, width, height float64) *Context

func CreatePDFContext

func CreatePDFContext(file string, width, height float64) *Context

CreatePDFContext : CGCreatePDFContext

func CreatePSContext

func CreatePSContext(file string, width, height float64) *Context

func (*Context) BeginPath

func (c *Context) BeginPath()

BeginPath : CGContextBeginPath

func (*Context) Close

func (c *Context) Close()

Close : CGContextClose

func (*Context) ClosePath

func (c *Context) ClosePath()

func (*Context) DrawToJPG

func (c *Context) DrawToJPG(file string, format string)

CGContextToFile

TODO(Happy-Ferret): Rename to a more generic method.

func (*Context) Fill

func (c *Context) Fill()

func (*Context) GetHeight

func (c *Context) GetHeight() float64

CGContextGetHeight

func (*Context) GetWidth

func (c *Context) GetWidth() float64

CGContextGetWidth

func (*Context) LineTo

func (c *Context) LineTo(x, y float64)

func (*Context) MoveTo

func (c *Context) MoveTo(x, y float64)

func (*Context) Rect

func (c *Context) Rect(x, y, width, height float64)

func (*Context) SetSourceRGB

func (c *Context) SetSourceRGB(r, g, b float64)

func (*Context) ShowText

func (c *Context) ShowText(utf8 string)

func (*Context) ToPixbuf

func (c *Context) ToPixbuf() *Pixbuf

func (*Context) WriteToPNG

func (c *Context) WriteToPNG(fileName string)

TODO(Happy-Ferret): Deprecate and merge into generic "ToFile" method.

type Display

type Display struct {
	GPU        string `json:"gpu"`
	OGLversion string `json:"openGL_version"`
	ID         string `json:"displayID"`
	XID        string `json:"X11displayID"`
	Width      int    `json:"width"`
	Height     int    `json:"height"`
	Gamma      Gamma
}

func MainDisplay

func MainDisplay() Display

type Gamma

type Gamma struct {
	Red   []uint16
	Green []uint16
	Blue  []uint16
}

type Pixbuf

type Pixbuf struct {
	GObject *C.GdkPixbuf
}

Directories

Path Synopsis
c

Jump to

Keyboard shortcuts

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