graphics

package
v0.0.0-...-e8131eb Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerticalTextureWidth      = 64
	VerticalTextureWidthMask  = VerticalTextureWidth - 1
	VerticalTextureHeight     = 64
	VerticalTextureHeightMask = VerticalTextureHeight - 1

	HorizontalTextureWidth      = 64
	HorizontalTextureWidthMask  = HorizontalTextureWidth - 1
	HorizontalTextureHeight     = 64
	HorizontalTextureHeightMask = HorizontalTextureHeight - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HorizontalStripe

type HorizontalStripe struct {
	Y              int
	Left           int
	Right          int
	LeftU          fixpoint.Value
	LeftV          fixpoint.Value
	DeltaU         fixpoint.Value
	DeltaV         fixpoint.Value
	Texture        *Texture
	TexShadeAmount int
}

type Plotter

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

func NewPlotter

func NewPlotter(elementID string) (*Plotter, error)

func (*Plotter) Flush

func (p *Plotter) Flush()

func (*Plotter) Height

func (p *Plotter) Height() int

func (*Plotter) PlotHorizontalStripe

func (p *Plotter) PlotHorizontalStripe(stripe HorizontalStripe)

func (*Plotter) PlotVerticalStripe

func (p *Plotter) PlotVerticalStripe(stripe VerticalStripe)

func (*Plotter) Width

func (p *Plotter) Width() int

type Texture

type Texture struct {
	Width  int
	Height int
	Texels []byte
}

type VerticalStripe

type VerticalStripe struct {
	X              int
	Top            int
	Bottom         int
	TopU           int
	TopV           fixpoint.Value
	DeltaV         fixpoint.Value
	Texture        *Texture
	TexShadeAmount int
}

Jump to

Keyboard shortcuts

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