Documentation
¶
Index ¶
- Variables
- func AddNoise(dst *image.RGBA, rng RandomSource, opts NoiseOptions) error
- func CropCover(src image.Image, width, height int, limits Limits) (*image.RGBA, error)
- func DrawSlot(dst *image.RGBA, at image.Point, mask *ShapeMask, fill, stroke color.Color, ...) error
- func ExtractPiece(src image.Image, at image.Point, mask *ShapeMask) (*image.RGBA, error)
- func PNGBytes(src image.Image, limits Limits) ([]byte, error)
- func PNGDataURI(src image.Image, limits Limits) (string, error)
- func PlaceNonOverlapping(rng RandomSource, bounds image.Rectangle, sizes []image.Point, ...) ([]image.Rectangle, error)
- func RandomFloat64(rng RandomSource) (float64, error)
- func RandomInt(rng RandomSource, min, max int) (int, error)
- func RectsOverlapWithPadding(a, b image.Rectangle, padding int) bool
- func RotateScale(src image.Image, degrees, scale float64, limits Limits) (*image.RGBA, error)
- type Background
- type Canvas
- type CryptoRandom
- type Engine
- type GradientBackground
- type Limits
- type NoiseOptions
- type RandomSource
- type ShapeKind
- type ShapeMask
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddNoise ¶
func AddNoise(dst *image.RGBA, rng RandomSource, opts NoiseOptions) error
func ExtractPiece ¶
func PlaceNonOverlapping ¶
func RandomFloat64 ¶
func RandomFloat64(rng RandomSource) (float64, error)
Types ¶
type Background ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
type CryptoRandom ¶
func (CryptoRandom) Uint64 ¶
func (r CryptoRandom) Uint64() (uint64, error)
type Engine ¶
type Engine struct {
Limits Limits
Random RandomSource
}
func New ¶
func New(limits Limits, rng RandomSource) *Engine
type GradientBackground ¶
type Limits ¶
func DefaultLimits ¶
func DefaultLimits() Limits
type NoiseOptions ¶
type RandomSource ¶
RandomSource permits deterministic tests while production uses crypto/rand.
Click to show internal directories.
Click to hide internal directories.