Documentation ¶
Index ¶
- func DilateMaskFromImage(img image.Image, padding int) image.Image
- func DrawFilledCircle(r int, c color.Color) *image.NRGBA
- func ImageWithPadding(img image.Image, padding int) image.Image
- type AlphaImageMatrix
- func (m *AlphaImageMatrix) Clone() *AlphaImageMatrix
- func (m *AlphaImageMatrix) DilateMask(padding uint32) *image.Alpha
- func (m *AlphaImageMatrix) Get(x int, y int) uint32
- func (m *AlphaImageMatrix) GetManhattanMatrix() *AlphaImageMatrix
- func (m *AlphaImageMatrix) ImageBounds() image.Rectangle
- func (m *AlphaImageMatrix) In(x int, y int) bool
- func (m *AlphaImageMatrix) NumColumns() int
- func (m *AlphaImageMatrix) NumRows() int
- func (m *AlphaImageMatrix) Set(x int, y int, value uint32)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DilateMaskFromImage ¶
DilateMaskFromImage takes a src image, and runs the dilation algorithm with the specified padding It returns a new image and does not modify the original
func DrawFilledCircle ¶
DrawFilledCircle returns a new image of a filled circle with radius r and fill color c
Types ¶
type AlphaImageMatrix ¶
type AlphaImageMatrix struct {
// contains filtered or unexported fields
}
func NewAlphaImageMatrix ¶
func NewAlphaImageMatrix(img image.Image) *AlphaImageMatrix
NewAlphaImageMatrix creates a new AlphaImageMatrix from the specified src image
func (*AlphaImageMatrix) Clone ¶
func (m *AlphaImageMatrix) Clone() *AlphaImageMatrix
Clone returns a copy of the matrix
func (*AlphaImageMatrix) DilateMask ¶
func (m *AlphaImageMatrix) DilateMask(padding uint32) *image.Alpha
DilateMask returns an Alpha mask with the specified padding around the source image. This does not modify the original matrix or image.
func (*AlphaImageMatrix) Get ¶
func (m *AlphaImageMatrix) Get(x int, y int) uint32
Get gets the alpha value at point (x,y)
func (*AlphaImageMatrix) GetManhattanMatrix ¶
func (m *AlphaImageMatrix) GetManhattanMatrix() *AlphaImageMatrix
GetManhattanMatrix generates a new matrix containing the manhattan distance away from the nearest pixel with an alpha value of at least alphaCutoff
func (*AlphaImageMatrix) ImageBounds ¶
func (m *AlphaImageMatrix) ImageBounds() image.Rectangle
ImageBounds returns the bounding image.Rectangle of the image
func (*AlphaImageMatrix) In ¶
func (m *AlphaImageMatrix) In(x int, y int) bool
In returns whether an (x,y) point lies within the image bounds
func (*AlphaImageMatrix) NumColumns ¶
func (m *AlphaImageMatrix) NumColumns() int
NumColumns returns the number of columns of the matrix
func (*AlphaImageMatrix) NumRows ¶
func (m *AlphaImageMatrix) NumRows() int
NumRows returns the number of rows of the matrix