render

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 5 Imported by: 7

Documentation

Overview

Package render implements utilities for rendering triangles onto an image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolygonData added in v1.1.7

type PolygonData struct {
	Polygon normgeom.NormPolygon
	Color   color.RGB
}

func PolygonsOnImage added in v1.1.7

func PolygonsOnImage(polygons []geom.Polygon, image image.Data) []PolygonData

type TriangleData

type TriangleData struct {
	Triangle normgeom.NormTriangle
	Color    color.RGB
}

TriangleData stores a triangle and its color.

func TrianglesOnImage

func TrianglesOnImage(triangles []geom.Triangle, image image.Data) []TriangleData

TrianglesOnImage calculates the optimal color for a group of triangles so the colors of triangles are closest to an image.

Jump to

Keyboard shortcuts

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