Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct {
Red, Green, Blue, Alpha uint8
}
Represents an RGBA color
func ColorFromNormalizedVec3 ¶
func ColorFromNormalizedVec3(vector Vec3) Color
Convert a normalized Vec3 into a fully opaque color
func (*Color) AsNormalizedVec3 ¶
func (c *Color) AsNormalizedVec3() Vec3
Normalize the color and return it as a Vec3
type PngImage ¶
type PngImage struct {
// contains filtered or unexported fields
}
Contains all functionality needed to export raw RGBA pixel data as a .png file
func NewPngImage ¶
Create a new output image
func (*PngImage) SetPixelColor ¶
Assign the specified pixel red, green, and blue components. Each pixel is assumed to use the RGBA uint8 color format. A color can be defined by specifying a value between 0 and 255 (inclusive) for each color component.
func (*PngImage) WritePngToFile ¶
Write the PNG image to a file on disk
Click to show internal directories.
Click to hide internal directories.