Documentation ¶
Overview ¶
Package rect provides types that represents a rectangle filled in with a single color at a specific location, that seamlessly works with Go's built-in "image", "image/color", and "image/draw" packages.
Example ¶
Here is an example of usage:
import "github.com/reiver/go-rect" // ... rectangle := rect.RGBA{ X:x, Y:y, Width:width, Height:height, R: r, G: g, B: b, A: a, } // ... draw.Draw(dst, rectangle.Bounds(), rectangle, rectangle.Bounds().Min, draw.Over)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorLinked ¶
func (ColorLinked) Bounds ¶
func (receiver ColorLinked) Bounds() image.Rectangle
func (ColorLinked) ColorModel ¶
func (receiver ColorLinked) ColorModel() color.Model
func (ColorLinked) RGBA ¶
func (receiver ColorLinked) RGBA() (r, g, b, a uint32)
type RGBA ¶
func (RGBA) ColorModel ¶
Click to show internal directories.
Click to hide internal directories.