Pixbuf.compositeColor

Creates a transformation of the source image src by scaling by scale_x and scale_y then translating by offset_x and offset_y, then alpha blends the rectangle (dest_x ,dest_y, dest_width, dest_height) of the resulting image with a checkboard of the colors color1 and color2 and renders it onto the destination image.

If the source image has no alpha channel, and overall_alpha is 255, a fast path is used which omits the alpha blending and just performs the scaling.

See Pixbuf.compositeColorSimple for a simpler variant of this function suitable for many tasks.

class Pixbuf
void
compositeColor
(,
int destX
,
int destY
,,,
double offsetX
,
double offsetY
,
double scaleX
,
double scaleY
,,,
int checkX
,
int checkY
,,
uint color1
,
uint color2
)

Parameters

dest Pixbuf

the gdk.Pixbuf into which to render the results

destX int

the left coordinate for region to render

destY int

the top coordinate for region to render

destWidth int

the width of the region to render

destHeight int

the height of the region to render

offsetX double

the offset in the X direction (currently rounded to an integer)

offsetY double

the offset in the Y direction (currently rounded to an integer)

scaleX double

the scale factor in the X direction

scaleY double

the scale factor in the Y direction

interpType GdkInterpType

the interpolation type for the transformation.

overallAlpha int

overall alpha for source image (0..255)

checkX int

the X offset for the checkboard (origin of checkboard is at -check_x, -check_y)

checkY int

the Y offset for the checkboard

checkSize int

the size of checks in the checkboard (must be a power of two)

color1 uint

the color of check at upper left

color2 uint

the color of the other check