Versions in this module Expand all Collapse all v0 v0.3.1 Nov 21, 2024 v0.3.0 Nov 21, 2024 Changes in this version type ImageBackground + func NewImageBackgroundFromFile(path string) (ImageBackground, error) + func (bg ImageBackground) SetScaleModeString(mode string) ImageBackground v0.2.0 Nov 20, 2024 v0.1.1 Nov 20, 2024 v0.1.0 Nov 20, 2024 Changes in this version + var DarkColor = color.RGBA + var LightColor = color.RGBA + type Background interface + Render func(content image.Image) image.Image + SetCornerRadius func(radius float64) Background + SetShadow func(shadow Shadow) Background + type ColorBackground struct + func NewColorBackground() ColorBackground + func (bg ColorBackground) Render(content image.Image) image.Image + func (bg ColorBackground) SetColor(c color.Color) ColorBackground + func (bg ColorBackground) SetCornerRadius(radius float64) Background + func (bg ColorBackground) SetPadding(value int) ColorBackground + func (bg ColorBackground) SetPaddingDetailed(top, right, bottom, left int) ColorBackground + func (bg ColorBackground) SetShadow(shadow Shadow) Background + type GradientBackground struct + func NewGradientBackground(gradientType GradientType, stops ...GradientStop) GradientBackground + func (bg GradientBackground) Render(content image.Image) image.Image + func (bg GradientBackground) SetAngle(angle float64) GradientBackground + func (bg GradientBackground) SetCenter(x, y float64) GradientBackground + func (bg GradientBackground) SetCornerRadius(radius float64) Background + func (bg GradientBackground) SetIntensity(intensity float64) GradientBackground + func (bg GradientBackground) SetPadding(value int) GradientBackground + func (bg GradientBackground) SetPaddingDetailed(top, right, bottom, left int) GradientBackground + func (bg GradientBackground) SetShadow(shadow Shadow) Background + type GradientStop struct + Color color.Color + Position float64 + type GradientType int + const AngularGradient + const DiamondGradient + const LinearGradient + const RadialGradient + const SpiralGradient + const SquareGradient + const StarGradient + type ImageBackground struct + func NewImageBackground(img image.Image) ImageBackground + func (bg ImageBackground) Render(content image.Image) image.Image + func (bg ImageBackground) SetBlurRadius(radius float64) ImageBackground + func (bg ImageBackground) SetCornerRadius(radius float64) Background + func (bg ImageBackground) SetOpacity(opacity float64) ImageBackground + func (bg ImageBackground) SetPadding(value int) ImageBackground + func (bg ImageBackground) SetPaddingDetailed(top, right, bottom, left int) ImageBackground + func (bg ImageBackground) SetScaleMode(mode ImageScaleMode) ImageBackground + func (bg ImageBackground) SetShadow(shadow Shadow) Background + type ImageScaleMode int + const ImageScaleCover + const ImageScaleFill + const ImageScaleFit + const ImageScaleStretch + const ImageScaleTile + type Padding struct + Bottom int + Left int + Right int + Top int + func NewPadding(value int) Padding + func NewPaddingHV(horizontal, vertical int) Padding + func (p Padding) ToPoint() image.Point + type Shadow interface + Apply func(img image.Image) image.Image + SetBlur func(radius float64) Shadow + SetColor func(c color.Color) Shadow + SetCornerRadius func(radius float64) Shadow + SetOffset func(x, y float64) Shadow + SetSpread func(radius float64) Shadow + func NewShadow() Shadow