Versions in this module Expand all Collapse all v0 v0.11.1 Dec 12, 2024 v0.11.0 Nov 16, 2024 Changes in this version + var ColourBlack = BrushColour + var ColourBlue = BrushColour + var ColourCyan = BrushColour + var ColourGreen = BrushColour + var ColourMagenta = BrushColour + var ColourRed = BrushColour + var ColourWhite = BrushColour + var ColourYellow = BrushColour + func BlendAlphaOverlay(cB, cA float64) (cO float64) + func BlendChannelOverlay(cB, cA, aB, aA float64) (cO float64) + func BlendColourOverlay(cB, cA color.Color) (cO color.Color) + func BlendImages(iB *image.NRGBA, iA *image.NRGBA) (iO *image.NRGBA, err error) + func ConvertImageToNRGBA(in image.Image) (out *image.NRGBA) + func ConvertImageToRGBA(in image.Image) (out *image.RGBA) + func CreateCaptcha(w, h uint) (c *m.Captcha, err error) + func CreateCaptchaImage(w, h uint, useSample bool, blend bool) (canvas *image.NRGBA, ringCount uint, err error) + func DegreeToRadian(degree float64) (radian float64) + func DeleteImageFile(filePath string) (err error) + func DrawImageToCanvas(in *image.RGBA, canvas image.Rectangle) (out *image.NRGBA) + func DrawLineWithSimpleBrush(canvas *image.NRGBA, br *SimpleBrush, p1, p2 Point2D, blend bool) + func DrawRingWithSimpleBrush(canvas *image.NRGBA, br *SimpleBrush, center Point2D, radius float64, ...) + func FileNameWithoutExtension(fileName string) string + func FillCanvasWithColour(canvas *image.NRGBA, col color.Color) + func FillCanvasWithHGradient(canvas *image.NRGBA, cL, cR BrushColour) (err error) + func FillCanvasWithVGradient(canvas *image.NRGBA, cT, cB BrushColour) (err error) + func GetColorComponentsPM(c color.Color) (r, g, b, a float64) + func GetColorComponentsS(c color.Color) (r, g, b, a float64) + func GetImageFromFilePath(filePath string) (img image.Image, err error) + func MakeFileName(id string) (fileName string) + func MakeRGBA64(r, g, b, a float64) color.RGBA64 + func MakeRecordFilePath(imagesFolder string, id string) (path string) + func MinInt(a, b int) (min int) + func MinUint(a, b uint) (min uint) + func RadianToDegree(radian float64) (degree float64) + func SaveImageAsPngFile(img image.Image, filePath string) (err error) + func UseSimpleBrush(canvas *image.NRGBA, brush *SimpleBrush, blend bool, u Point2D) + func UseSimpleBrushS(canvas *image.NRGBA, brush *SimpleBrush, blend bool, u Point2D) + func UseSolidBrush(canvas *image.NRGBA, brush *SolidBrush, u Point2D) + type BrushColour struct + A float64 + B float64 + G float64 + R float64 + func (bc BrushColour) PremultipliedToStraight() (out BrushColour) + func (bc BrushColour) RGBA() (r, g, b, a uint32) + func (bc BrushColour) StraightToPremultiplied() (out BrushColour) + type Distance = float64 + func Distance2D(a, b Point2D) (s Distance) + type Point2D struct + X float64 + Y float64 + type SimpleBrush struct + Colour BrushColour + InnerRadius float64 + OuterRadius float64 + func (sb *SimpleBrush) GetSample() (sample *image.NRGBA) + type SolidBrush struct + Colour BrushColour + InnerRadius float64