Documentation
¶
Index ¶
- Variables
- type Image
- func (i *Image) At(x, y int) color.Color
- func (i *Image) Bounds() image.Rectangle
- func (i *Image) ColorModel() color.Model
- func (i *Image) Composite(src *Image, r image.Rectangle, sp image.Point)
- func (i *Image) Depth() int
- func (i *Image) Fill(rect image.Rectangle, col color.Color)
- func (i *Image) SaveRaw(filename string) error
- func (i *Image) Set(x, y int, c color.Color)
- type PixmanColor
- type PixmanFormatCode
- type PixmanImage
- type PixmanOperation
Constants ¶
This section is empty.
Variables ¶
var ( // These must match the C function signatures ImageCreateBits func(format PixmanFormatCode, width int, height int, bits *uint32, rowstride int) *PixmanImage ImageCreateSolidFill func(color *PixmanColor) *PixmanImage ImageGetFormat func(image *PixmanImage) PixmanFormatCode ImageGetWidth func(image *PixmanImage) int32 ImageGetHeight func(image *PixmanImage) int32 ImageGetStride func(image *PixmanImage) int32 ImageGetDepth func(image *PixmanImage) int32 ImageGetData func(image *PixmanImage) *uint32 ImageComposite32 func(op PixmanOperation, src *PixmanImage, mask *PixmanImage, dest *PixmanImage, src_x, src_y, mask_x, mask_y, dest_x, dest_y int32, width, height int32) Fill func(bits *uint32, stride int, bpp int, x int, y int, width int, height int, xor uint32) int ImageUnref func(image *PixmanImage) int )
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func ImageFromBits ¶
func (*Image) ColorModel ¶
type PixmanColor ¶
PixmanColor mirrors the C struct pixman_color_t See: https://gitlab.freedesktop.org/pixman/pixman/-/blob/9879f6cfc40b4ef3bdca4ee9aaedacff8fb87244/pixman/pixman.h#L150
type PixmanFormatCode ¶
type PixmanFormatCode uint32
const ( PIXMAN_a8r8g8b8 PixmanFormatCode = 0x20028888 PIXMAN_x8r8g8b8 PixmanFormatCode = 0x20020888 PIXMAN_a8b8g8r8 PixmanFormatCode = 0x20038888 PIXMAN_x8b8g8r8 PixmanFormatCode = 0x20030888 PIXMAN_b8g8r8a8 PixmanFormatCode = 0x20088888 PIXMAN_b8g8r8x8 PixmanFormatCode = 0x20080888 PIXMAN_r5g6b5 PixmanFormatCode = 0x10020565 PIXMAN_b5g6r5 PixmanFormatCode = 0x10030565 PIXMAN_a1r5g5b5 PixmanFormatCode = 0x10021555 PIXMAN_x1r5g5b5 PixmanFormatCode = 0x10020555 PIXMAN_a1b5g5r5 PixmanFormatCode = 0x10031555 PIXMAN_x1b5g5r5 PixmanFormatCode = 0x10030555 PIXMAN_a4r4g4b4 PixmanFormatCode = 0x10024444 PIXMAN_x4r4g4b4 PixmanFormatCode = 0x10020444 PIXMAN_a4b4g4r4 PixmanFormatCode = 0x10034444 PIXMAN_x4b4g4r4 PixmanFormatCode = 0x10030444 PIXMAN_r8g8b8a8 PixmanFormatCode = 0x20098888 PIXMAN_r8g8b8x8 PixmanFormatCode = 0x20090888 )
Pixman format codes (partial list, add more as needed) See https://gitlab.freedesktop.org/pixman/pixman/-/blob/9879f6cfc40b4ef3bdca4ee9aaedacff8fb87244/pixman/pixman.h#L1044 Note: The lack of macros in Go means we have to manually define these See helper/helper.c to regenerate
func (PixmanFormatCode) BPP ¶
func (f PixmanFormatCode) BPP() int
Determines the depth in bits-per-pixel for a given Pixman format code. See https://gitlab.freedesktop.org/pixman/pixman/-/blob/9879f6cfc40b4ef3bdca4ee9aaedacff8fb87244/pixman/pixman.h#L1010
func (PixmanFormatCode) String ¶
func (f PixmanFormatCode) String() string
type PixmanImage ¶
type PixmanImage struct{}
type PixmanOperation ¶
type PixmanOperation uint32
const ( PIXMAN_OP_CLEAR PixmanOperation = 0x00 PIXMAN_OP_SRC PixmanOperation = 0x01 PIXMAN_OP_DST PixmanOperation = 0x02 PIXMAN_OP_OVER PixmanOperation = 0x03 PIXMAN_OP_OVER_REVERSE PixmanOperation = 0x04 PIXMAN_OP_IN PixmanOperation = 0x05 PIXMAN_OP_IN_REVERSE PixmanOperation = 0x06 PIXMAN_OP_OUT PixmanOperation = 0x07 PIXMAN_OP_OUT_REVERSE PixmanOperation = 0x08 PIXMAN_OP_ATOP PixmanOperation = 0x09 PIXMAN_OP_ATOP_REVERSE PixmanOperation = 0x0a PIXMAN_OP_XOR PixmanOperation = 0x0b PIXMAN_OP_ADD PixmanOperation = 0x0c PIXMAN_OP_SATURATE PixmanOperation = 0x0d )
Pixman composite operations See https://gitlab.freedesktop.org/pixman/pixman/-/blob/9879f6cfc40b4ef3bdca4ee9aaedacff8fb87244/pixman/pixman.h#L388