script

package
v0.0.0-...-1fae4d3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 5 Imported by: 0

README

#script GoDoc Package script implements a device and surface for writing drawing operations to a file for debugging purposes.

Download:

go get github.com/jimmyfrasche/cairo/script

Package script implements a device and surface for writing drawing operations to a file for debugging purposes.

Libcairo must be compiled with

CAIRO_HAS_SCRIPT_SURFACE

in addition to the requirements of cairo.


Automatically generated by autoreadme on 2014.05.08

Documentation

Overview

Package script implements a device and surface for writing drawing operations to a file for debugging purposes.

Libcairo must be compiled with

CAIRO_HAS_SCRIPT_SURFACE

in addition to the requirements of cairo.

Index

Constants

View Source
const (
	//ASCII is a human readable mode.
	ASCII mode = C.CAIRO_SCRIPT_MODE_ASCII
	//Binary specifies a byte-code based mode.
	Binary mode = C.CAIRO_SCRIPT_MODE_BINARY
)

The mode type specifies the output mode of a script.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	*cairo.XtensionDevice
	// contains filtered or unexported fields
}

Device is a pseudo-Device that records operations performed on it.

func New

func New(w io.Writer, mode mode) (Device, error)

New creates a script device from writer in mode.

Originally cairo_script_create_for_stream.

func (Device) Comment

func (d Device) Comment(c string)

Comment adds a comment to the script.

Originally cairo_script_write_comment.

func (Device) FromRecordingSurface

func (d Device) FromRecordingSurface(rs recording.Surface) error

FromRecordingSurface outputs the record operations in rs to d.

Originally cairo_script_from_recording_surface.

func (Device) Mode

func (d Device) Mode() mode

Mode reports the recording mode of this device.

Originally cairo_script_get_mode.

func (Device) NewSurface

func (d Device) NewSurface(content cairo.Content, width, height float64) (Surface, error)

NewSurface creates a script surface that records to d.

Originally cairo_script_surface_create.

func (Device) Proxy

func (d Device) Proxy(s cairo.Surface) (p Surface, err error)

Proxy creates a script surface p that renders to s and records to d.

Originally cairo_script_surface_create_for_target.

type Surface

type Surface struct {
	cairo.XtensionPagedVectorSurface
}

Surface is a script surface.

Jump to

Keyboard shortcuts

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