zsort

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLayerForScene

func NewLayerForScene(scene *seen.Scene) layer.Layer

Types

type ByZ

type ByZ []zfragment

ByZ implements sorting by comparing the Z of the Barycenter of the Projected points

func (ByZ) Len

func (a ByZ) Len() int

func (ByZ) Less

func (a ByZ) Less(i, j int) bool

func (ByZ) Swap

func (a ByZ) Swap(i, j int)

type Layer

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

Layer implements the layer.Layer interface. Layer extends seen.Scene with a function to paint the the scene on a Painter.

func (*Layer) FlushCache

func (s *Layer) FlushCache()

FlushCache removes all elements from the cache. This may be necessary if you add and remove many shapes from the scene's groups since this cache has no eviction policy.

func (*Layer) RenderOn

func (l *Layer) RenderOn(canvas canvas.Canvas)

RenderOn renders every Face in the scene's groups on the Canvas passed in as an argument. When encountering a TextShape use a TextPainter to render. When encountering any other shape assign a PathPainter to render.

Jump to

Keyboard shortcuts

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