Class pyglet.image.CheckerImagePattern

ImagePattern --+
               |
              CheckerImagePattern
Create an image with a tileable checker image.

Methods

  __init__(self, color1=(150, 150, 150, 255), color2=(200, 200, 200, 255))
Initialise with the given colors.
AbstractImage create_image(self, width, height)
Create an image of the given size.

Method Details

__init__

(Constructor) __init__(self, color1=(150, 150, 150, 255), color2=(200, 200, 200, 255))
Initialise with the given colors.
Parameters:
color1 : (int, int, int, int)
4-tuple of ints in range [0,255] giving RGBA components of color to fill with. This color appears in the top-left and bottom-right corners of the image.
color2 : (int, int, int, int)
4-tuple of ints in range [0,255] giving RGBA components of color to fill with. This color appears in the top-right and bottom-left corners of the image.

create_image

create_image(self, width, height)
Create an image of the given size.
Returns: AbstractImage
Overrides:
ImagePattern.create_image