mulberry

package module
v0.0.0-...-dbaaff6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

mulberry

A text viewer built on the oak engine. Initially made to support easy viewing of the extracted FBX files in openfbx.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*View)

Option is a functional option type used in mulberry constructors

func Dimensions

func Dimensions(w, h int) Option

Dimensions sets the width and height of a view

type View

type View struct {
	*render.Sprite
	// contains filtered or unexported fields
}

A View is a portion of a io.ReadWriteSeeker represented graphically

func New

func New(r io.ReadWriteSeeker, opts ...Option) (*View, error)

New creates a View to display the given ReadWriteSeeker.

func NewFromFile

func NewFromFile(file string, opts ...Option) (*View, error)

NewFromFile is equivalent to calling `New` on the opened file contents.

func (*View) Draw

func (v *View) Draw(buff draw.Image)

Draw draws this view to the given buffer

func (*View) DrawOffset

func (v *View) DrawOffset(buff draw.Image, xOff, yOff float64)

DrawOffset draws this view to the given buffer with some 2D offset

func (*View) GetDims

func (v *View) GetDims() (int, int)

GetDims returns the dimensions of this View

func (*View) Init

func (v *View) Init() event.CID

Init sets up this view's event.CID

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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