Documentation
¶
Index ¶
- Variables
- func CloneGoImage(src image.Image) draw.Image
- func DrawCircle(img SetableImage, circle zgeo.Circle, col zgeo.Color)
- func FromGo(img image.Image, got func(image *Image))
- func FromPath(path string, useCache bool, got func(*Image))
- func FromPathAddScreenScaleSuffix(spath string, useCache bool, got func(*Image))
- func GetImages(images []*ImageGetter, useCache bool, got func(all bool))
- func GoAlterPixels(img SetableImage, set func(x, y int, c zgeo.Color) zgeo.Color)
- func GoForPixels(img image.Image, got func(x, y int, color zgeo.Color))
- func GoImageBlurred(img image.Image, sigma float64) *image.NRGBA
- func GoImageCropped(img image.Image, crop zgeo.Rect, copy bool) (image.Image, error)
- func GoImageFlippedHorizontal(img image.Image) *image.NRGBA
- func GoImageFlippedVertical(img image.Image) *image.NRGBA
- func GoImageFromFile(path string) (img image.Image, format string, err error)
- func GoImageFromURL(path string) (img image.Image, format string, err error)
- func GoImageJPEGData(goImage image.Image, qualityPercent int) ([]byte, error)
- func GoImagePNGData(goImage image.Image) ([]byte, error)
- func GoImageShrunkCroppedToFillSize(img image.Image, size zgeo.Size, proportional bool) (image.Image, error)
- func GoImageShrunkInto(goImage image.Image, size zgeo.Size, proportional bool) (image.Image, error)
- func GoImageToGoRGBA(i image.Image) image.Image
- func GoImageToJPEGFile(img image.Image, filepath string, qualityPercent int) error
- func GoImageToNRGBA(img image.Image) *image.NRGBA
- func GoImageToPNGFile(img image.Image, filepath string) error
- func GoImageZSize(img image.Image) zgeo.Size
- func GoImagesAreIdentical(img1, img2 image.Image) bool
- func GoImagesDiffAreaRatio(a, b image.Image, pixelDiffPercent float64, doAlpha bool) float64
- func GoTransformed(img image.Image, set func(x, y int, c zgeo.Color) zgeo.Color) *image.NRGBA
- func ImageFromFile(filepath string, got func(i *Image, format string, err error))
- func IsImageExtensionInName(surl string) bool
- func MakeImagePathWithAddedScale(spath string, scale int) string
- func NewGoWithNoise(img image.Image, noiseCoverage float32, noiseMix float32) *image.NRGBA
- type Image
- func (i *Image) CapInsets() zgeo.Rect
- func (i *Image) Colored(color zgeo.Color, size zgeo.Size) *Image
- func (i *Image) FixedOrientation() *Image
- func (i *Image) ForPixels(got func(x, y int, color zgeo.Color))
- func (i *Image) GetLeftRightFlipped() *Image
- func (i *Image) GetRotationAdjusted(flip bool) *Image
- func (i *Image) HasAlpha() bool
- func (i *Image) MixedWithColor(color zgeo.Color, amount float32, got func(i *Image))
- func (i *Image) Normalized() *Image
- func (i *Image) RGBAImage(got func(img *Image))
- func (i *Image) Release()
- func (i *Image) Rotated(deg float64, around *zgeo.Pos) *Image
- func (i *Image) SaveToPNG(filepath string) error
- func (i *Image) SetCapInsets(capInsets zgeo.Rect) *Image
- func (i *Image) SetCapInsetsCorner(c zgeo.Size) *Image
- func (i *Image) ShrunkInto(size zgeo.Size, proportional bool, got func(*Image))
- func (i *Image) Size() zgeo.Size
- func (i *Image) TintedWithColor(color zgeo.Color, amount float32, got func(i *Image))
- func (i *Image) ToGo() image.Image
- type ImageGetter
- type Loader
- type Owner
- type SetableImage
- type SolidImage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GlobalURLPrefix string MainScreenScaleFunc = func() float64 { return 1 } )
Functions ¶
func DrawCircle ¶
func DrawCircle(img SetableImage, circle zgeo.Circle, col zgeo.Color)
func GetImages ¶
func GetImages(images []*ImageGetter, useCache bool, got func(all bool))
GetImages goes thu the ImageGetter's scaling/tinting images, returning when all are done. Release() is NOT called on input or output images
func GoAlterPixels ¶
GoAlterPixels calls set for the pixel at set's x, y, and sets it if the color returned is Valid
func GoImageCropped ¶
func GoImageFromFile ¶
func GoImageJPEGData ¶
func GoImageShrunkInto ¶
GGoImageShrunkInto scales down the image to fit inside size. It must be a subset of standard libarary image types, as it uses rez package to downsample, which works on underlying image types.
func GoImageToJPEGFile ¶
func GoImagesAreIdentical ¶
func GoImagesDiffAreaRatio ¶
func GoTransformed ¶
GoTransformed creates a new image where if set returns a valid color, it uses that, otherwise old.
func ImageFromFile ¶
func IsImageExtensionInName ¶
Types ¶
type Image ¶
func ImageNewNRGBA ¶
func (*Image) FixedOrientation ¶
func (*Image) GetLeftRightFlipped ¶
func (*Image) GetRotationAdjusted ¶
func (*Image) MixedWithColor ¶
func (*Image) Normalized ¶
func (*Image) ShrunkInto ¶
func (*Image) TintedWithColor ¶
type ImageGetter ¶
type ImageGetter struct {
Path string
Image *Image
Tint zgeo.Color
TintAmount float32
MaxSize zgeo.Size
Alignment zgeo.Alignment
Margin zgeo.Size
Opacity float32
}
func ImageGetterNew ¶
func ImageGetterNew() *ImageGetter
type SetableImage ¶
func GoImagesChangeDifference ¶
func GoImagesChangeDifference(img1, img2 image.Image, change func(imgSet SetableImage, amount float32, c1, c2 color.Color, x, y int)) (diffImage SetableImage, changedAmount float32)
type SolidImage ¶
func MakeSolidImage ¶
func MakeSolidImage(size zgeo.Size, col zgeo.Color) SolidImage
func (SolidImage) Bounds ¶
func (c SolidImage) Bounds() image.Rectangle
func (SolidImage) ColorModel ¶
func (c SolidImage) ColorModel() color.Model
Click to show internal directories.
Click to hide internal directories.