pixeltriangle

package
v0.0.0-...-a1867f6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PixelTriangle

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

PixelTriangle represents a triangle of pixels. It has one pixel at the top, and the width of the input image at the bottom.

func New

func New() *PixelTriangle

func NewWithSeed

func NewWithSeed(seed int64) *PixelTriangle

NewWithSeed returns a PixelTriangle with a fixed random seed.

func (*PixelTriangle) DrawSamples

func (pt *PixelTriangle) DrawSamples(targetImage lincolor.Image)

DrawSamples draws red pixels in the image at the locations of the pixels in the triangle.

func (*PixelTriangle) Expand

func (pt *PixelTriangle) Expand(targetImage lincolor.Image)

Expand overwrites the top part of the target image with the pixel triangle. Every row of the image will be overwritten, blending the space between pixels in the triangle.

func (*PixelTriangle) Setup

func (pt *PixelTriangle) Setup(sourceImage lincolor.Image, skySize sky.Size)

New constructs a pixel triangle suitable for filling up the sky.

Jump to

Keyboard shortcuts

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