GlowBit.py
|
One dimensional graph object for graph bars on GlowBit Matrix displays. More...
Public Member Functions | |
def | __init__ (self, originX=0, originY=7, length=8, direction="Up", minValue=0, maxValue=255, colour=0xFFFFFF, colourMap="Solid", update=False) |
Initialisation routine for the glowbit.matrix.graph1D object. More... | |
Public Member Functions inherited from glowbit.colourFunctions | |
def | wheel (self, pos) |
Converts an integer "colour wheel position" to a packed 32-bit RGB GlowBit colour value. More... | |
def | rgbColour (self, r, g, b) |
Converts the r, g, and b integer arguments to a packed 32-bit RGB GlowBit colour value. More... | |
def | glowbitColour2RGB (self, colour) |
Converts a 32-bit GlowBit colour value to an (R,G,B) tuple. More... | |
def | red (self) |
Returns the GlowBit colour value for pure red. | |
def | green (self) |
Returns the GlowBit colour value for pure green. | |
def | blue (self) |
Returns the GlowBit colour value for pure blue. | |
def | yellow (self) |
Returns the GlowBit colour value for yellow. | |
def | purple (self) |
Returns the GlowBit colour value for purple. | |
def | cyan (self) |
Returns the GlowBit colour value for cyan. | |
def | white (self) |
Returns the GlowBit colour value for white. | |
def | black (self) |
Returns the GlowBit colour value for black. | |
Public Member Functions inherited from glowbit.colourMaps | |
def | colourMapSolid (self, index, minIndex, maxIndex) |
Trivial colourmap method which always returns the colour in the parent object. More... | |
def | colourMapRainbow (self, index, minIndex, maxIndex) |
Maps the pure hue colour wheel between minIndex and maxIndex. More... | |
Public Attributes | |
minValue | |
maxValue | |
originX | |
originY | |
length | |
orientation | |
inc | |
m | |
update | |
colour | |
colourMap | |
One dimensional graph object for graph bars on GlowBit Matrix displays.
def glowbit.glowbitMatrix.graph1D.__init__ | ( | self, | |
originX = 0 , |
|||
originY = 7 , |
|||
length = 8 , |
|||
direction = "Up" , |
|||
minValue = 0 , |
|||
maxValue = 255 , |
|||
colour = 0xFFFFFF , |
|||
colourMap = "Solid" , |
|||
update = False |
|||
) |
Initialisation routine for the glowbit.matrix.graph1D object.
A graph1D object will be drawn with a fixed width of 1 pixel and arbitrary length.
originX | The x coordinate of the graph's origin. The "minValue" argument will be mapped to this pixel. |
originY | The y coordinate of the graph's origin. The "minValue" argument will be mapped to this pixel. |
length | The length, in pixels, of the graph's drawing area. |
direction | One of "Up", "Down", "Left", or "Right". Specifies the direction in which the graph will be drawn. |
minValue | The value which will be mapped to the origin. |
maxValue | The value which will be mapped to the 'end' of the graph. The (x,y) coordinate will be 'length' pixels away from the origin in the direction specified by 'direction'. |
colour | A packed 32-bit GlowBit colour value. Used by the "Solid" colourmap, ignored by the "Rainbow" colourmap. Can also be accessed when writing custom colour map functions. |
colourMap | Either the string "Solid" or "Rainbow" or a pointer to a custom colour map function. Custom colour maps must take the parameters colourMap(self, index, minIndex, maxIndex). |
update | If update=True then a call to updateGraph1D() will, in turn, call glowbit.pixelsShow() to update the physical LEDs. |