internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

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

func NewCanvas

func NewCanvas(renderer *Renderer) *Canvas

func (*Canvas) Begin

func (c *Canvas) Begin()

func (*Canvas) Clip

func (c *Canvas) Clip(bounds ui.Bounds)

func (*Canvas) Contour added in v0.3.0

func (c *Canvas) Contour() ui.Contour

func (*Canvas) DrawSurface added in v0.3.0

func (c *Canvas) DrawSurface(surface ui.Surface)

func (*Canvas) End

func (c *Canvas) End()

func (*Canvas) Pop

func (c *Canvas) Pop()

func (*Canvas) Push

func (c *Canvas) Push()

func (*Canvas) Resize

func (c *Canvas) Resize(width, height int)

func (*Canvas) ResizeFramebuffer

func (c *Canvas) ResizeFramebuffer(width, height int)

func (*Canvas) Shape added in v0.3.0

func (c *Canvas) Shape() ui.Shape

func (*Canvas) Text added in v0.3.0

func (c *Canvas) Text() ui.Text

func (*Canvas) Translate

func (c *Canvas) Translate(delta ui.Position)

type Contour added in v0.3.0

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

func (*Contour) CloseLoop added in v0.3.0

func (c *Contour) CloseLoop()

func (*Contour) CubeTo added in v0.3.0

func (c *Contour) CubeTo(control1, control2, position sprec.Vec2, stroke Stroke)

func (*Contour) Init added in v0.3.0

func (c *Contour) Init()

func (*Contour) LineTo added in v0.3.0

func (c *Contour) LineTo(position sprec.Vec2, stroke Stroke)

func (*Contour) MoveTo added in v0.3.0

func (c *Contour) MoveTo(position sprec.Vec2, stroke Stroke)

func (*Contour) QuadTo added in v0.3.0

func (c *Contour) QuadTo(control, position sprec.Vec2, stroke Stroke)

type ContourMesh added in v0.3.0

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

func (*ContourMesh) Allocate added in v0.3.0

func (m *ContourMesh) Allocate()

func (*ContourMesh) Append added in v0.3.0

func (m *ContourMesh) Append(vertex ContourVertex)

func (*ContourMesh) Offset added in v0.3.0

func (m *ContourMesh) Offset() int

func (*ContourMesh) Release added in v0.3.0

func (m *ContourMesh) Release()

func (*ContourMesh) Reset added in v0.3.0

func (m *ContourMesh) Reset()

func (*ContourMesh) Update added in v0.3.0

func (m *ContourMesh) Update()

type ContourPoint added in v0.3.0

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

type ContourVertex added in v0.3.0

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

type Fill added in v0.3.0

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

type Font

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

func (*Font) Destroy added in v0.3.0

func (f *Font) Destroy()

func (*Font) Family

func (f *Font) Family() string

func (*Font) SubFamily

func (f *Font) SubFamily() string

func (*Font) TextSize added in v0.3.0

func (f *Font) TextSize(text string, fontSize int) ui.Size

type FontFactory added in v0.3.0

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

func NewFontFactory added in v0.3.0

func NewFontFactory(renderer *Renderer) *FontFactory

func (*FontFactory) CreateFont added in v0.3.0

func (f *FontFactory) CreateFont(font *opentype.Font) *Font

func (*FontFactory) Free added in v0.3.0

func (f *FontFactory) Free()

func (*FontFactory) Init added in v0.3.0

func (f *FontFactory) Init()

type Image

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

func NewImage

func NewImage() *Image

func (*Image) Allocate

func (i *Image) Allocate(img image.Image)

func (*Image) Destroy added in v0.3.0

func (i *Image) Destroy()

func (*Image) Release

func (i *Image) Release()

func (*Image) Size

func (i *Image) Size() ui.Size

type Layer

type Layer struct {
	Translation ui.Position
	ClipBounds  ui.Bounds
	// contains filtered or unexported fields
}

func (*Layer) InheritFrom

func (l *Layer) InheritFrom(other *Layer)

func (*Layer) Next

func (l *Layer) Next() *Layer

func (*Layer) Previous

func (l *Layer) Previous() *Layer

type Material

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

func (*Material) Allocate

func (m *Material) Allocate()

func (*Material) Release

func (m *Material) Release()

type Paragraph added in v0.3.0

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

type Renderer added in v0.3.0

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

func NewRenderer added in v0.3.0

func NewRenderer() *Renderer

func (*Renderer) Begin added in v0.3.0

func (r *Renderer) Begin(target Target)

func (*Renderer) BeginContour added in v0.3.0

func (r *Renderer) BeginContour() *Contour

func (*Renderer) BeginShape added in v0.3.0

func (r *Renderer) BeginShape(fill Fill) *Shape

func (*Renderer) BeginText added in v0.3.0

func (r *Renderer) BeginText(typography Typography) *Text

func (*Renderer) ClipBounds added in v0.3.0

func (r *Renderer) ClipBounds() (left, right, top, bottom float32)

func (*Renderer) DrawSurface added in v0.3.0

func (r *Renderer) DrawSurface(surface Surface)

func (*Renderer) End added in v0.3.0

func (r *Renderer) End()

func (*Renderer) EndContour added in v0.3.0

func (r *Renderer) EndContour(contour *Contour)

func (*Renderer) EndShape added in v0.3.0

func (r *Renderer) EndShape(shape *Shape)

func (*Renderer) EndText added in v0.3.0

func (r *Renderer) EndText(text *Text)

func (*Renderer) Free added in v0.3.0

func (r *Renderer) Free()

func (*Renderer) Init added in v0.3.0

func (r *Renderer) Init()

func (*Renderer) SetClipBounds added in v0.3.0

func (r *Renderer) SetClipBounds(left, right, top, bottom float32)

func (*Renderer) SetTextureTransform added in v0.3.0

func (r *Renderer) SetTextureTransform(textureTransform sprec.Mat4)

func (*Renderer) SetTransform added in v0.3.0

func (r *Renderer) SetTransform(transform sprec.Mat4)

func (*Renderer) TextureTransform added in v0.3.0

func (r *Renderer) TextureTransform() sprec.Mat4

func (*Renderer) Transform added in v0.3.0

func (r *Renderer) Transform() sprec.Mat4

type Shape added in v0.3.0

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

func (*Shape) CubeTo added in v0.3.0

func (s *Shape) CubeTo(control1, control2, position sprec.Vec2)

func (*Shape) Init added in v0.3.0

func (s *Shape) Init(fill Fill)

func (*Shape) LineTo added in v0.3.0

func (s *Shape) LineTo(position sprec.Vec2)

func (*Shape) MoveTo added in v0.3.0

func (s *Shape) MoveTo(position sprec.Vec2)

func (*Shape) QuadTo added in v0.3.0

func (s *Shape) QuadTo(control, position sprec.Vec2)

type ShapeMesh added in v0.3.0

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

func (*ShapeMesh) Allocate added in v0.3.0

func (m *ShapeMesh) Allocate()

func (*ShapeMesh) Append added in v0.3.0

func (m *ShapeMesh) Append(vertex ShapeVertex)

func (*ShapeMesh) Offset added in v0.3.0

func (m *ShapeMesh) Offset() int

func (*ShapeMesh) Release added in v0.3.0

func (m *ShapeMesh) Release()

func (*ShapeMesh) Reset added in v0.3.0

func (m *ShapeMesh) Reset()

func (*ShapeMesh) Update added in v0.3.0

func (m *ShapeMesh) Update()

type ShapePoint added in v0.3.0

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

type ShapeVertex added in v0.3.0

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

type StencilMode added in v0.3.0

type StencilMode int
const (
	StencilModeNone StencilMode = iota
	StencilModeNonZero
	StencilModeOdd
)

type Stroke added in v0.3.0

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

type SubContour added in v0.3.0

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

type SubMesh

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

type SubShape added in v0.3.0

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

type Surface added in v0.3.0

type Surface interface {
	Render(x, y, width, height int)
}

type Target added in v0.3.0

type Target struct {
	Framebuffer *opengl.Framebuffer
	Width       int
	Height      int
}

type Text added in v0.3.0

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

func (*Text) Init added in v0.3.0

func (t *Text) Init(typography Typography)

func (*Text) Write added in v0.3.0

func (t *Text) Write(value string, position sprec.Vec2)

type TextMesh added in v0.3.0

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

func (*TextMesh) Allocate added in v0.3.0

func (m *TextMesh) Allocate()

func (*TextMesh) Append added in v0.3.0

func (m *TextMesh) Append(vertex TextVertex)

func (*TextMesh) Offset added in v0.3.0

func (m *TextMesh) Offset() int

func (*TextMesh) Release added in v0.3.0

func (m *TextMesh) Release()

func (*TextMesh) Reset added in v0.3.0

func (m *TextMesh) Reset()

func (*TextMesh) Update added in v0.3.0

func (m *TextMesh) Update()

type TextVertex added in v0.3.0

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

type Typography added in v0.3.0

type Typography struct {
	Font  *Font
	Size  float32
	Color sprec.Vec4
}

Jump to

Keyboard shortcuts

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