Table of contents Index

class GvBitLayerLUT - Class for managing a LUT for display bitplane rasters.

Declared in module gvbitlayerlut

Synopsis

class GvBitLayerLUT:
    def gvbitlayerlut.GvBitLayerLUT.__init__(self) # Initialize with eight distinct colours for bit planes.
    def gvbitlayerlut.GvBitLayerLUT.get_lut_as_string(self)
    def gvbitlayerlut.GvBitLayerLUT.set_color(self, plane, color) # Set the color of one of the bit planes.
    def gvbitlayerlut.GvBitLayerLUT.set_priority(self, priority, plane) # Set what plane is drawn at a given priority level.

Description

This class keeps state for managing 8 colourized bitplanes, and can produce an appropriate lut in string format, suitable for using with GvRasterLayer.put_lut() when needed.

gvbitlayerlut.GvBitLayerLUT.get_lut_as_string(self)

None

Fetch a lut suitable for use with GvRasterLayer.lut_put() representing the current bit plane configuration.

gvbitlayerlut.GvBitLayerLUT.set_color(self, plane, color)

Set the color of one of the bit planes.

plane
a bit plane number from 0 to 7.
color
an RGBA tuple such as (255,0,0,255)

gvbitlayerlut.GvBitLayerLUT.set_priority(self, priority, plane)

Set what plane is drawn at a given priority level.

By default (after initialization) bit plane zero is priority zero, through to bit plane seven being at priority seven. To move bit plane 0 to top priority, and move everything else down one it would be necessary to do something like this example:

bit_lut.set_priority(7,0) bit_lut.set_priority(6,7) bit_lut.set_priority(5,6) bit_lut.set_priority(4,5) bit_lut.set_priority(3,4) bit_lut.set_priority(2,3) bit_lut.set_priority(1,2) bit_lut.set_priority(0,1)

priority
a priority level from 0 to 7
plane
a plane from 0 to 7

Valid HTML 4.0! Made with CSS