Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ColourNameToRGBA = map[string]color.NRGBA{
"darkgray": {R: 0x55, G: 0x57, B: 0x53},
"red": {R: 0xEF, G: 0x29, B: 0x29},
"green": {R: 0x8A, G: 0xE2, B: 0x34},
"yellow": {R: 0xFC, G: 0xE9, B: 0x4F},
"blue": {R: 0x72, G: 0x9F, B: 0xCF},
"magenta": {R: 0xEE, G: 0x38, B: 0xDA},
"cyan": {R: 0x34, G: 0xE2, B: 0xE2},
"white": {R: 0xEE, G: 0xEE, B: 0xEC},
}
Functions ¶
func CopyRGBAtoBGR565 ¶
copyRGBAtoBGR565 is an inlined version of the hot pixel copying loop for the special case of copying from an *image.RGBA to an *fbimage.BGR565.
This specialization brings down copying time to 137ms (from 1.8s!) on the Raspberry Pi 4.
func CopyRGBAtoBGRA ¶
copyRGBAtoBGRA is an inlined version of the hot pixel copying loop for the special case of copying from an *image.RGBA to an *fbimage.BGRA.
This specialization brings down copying time to 5ms (from 60-70ms) on an amd64 qemu VM with virtio VGA.
func ScaleImageInside ¶
Calculated linear scaling of an rectangle from its original size to a max width and max height of a desired output. The whole picture is scaled inside the rectangle with blank space to right and top
func ScaleImageOuter ¶
Calculated linear scaling of an rectangle from its original size to a max width and max height of a desired output. The whole picture is scaled inside the rectangle with blank space to right and top. It is assumed the image is not rescaled when it is drawn
Parameters - bounds is the size of the image - maxW and maxH is frame size needs to be mapped to - anchor which side of picture is to be anchored (might be better as a point)
Types ¶
This section is empty.