GlowBit.py
|
Object for drawing 2 dimensional time series graphs on GlowBit Matrix displays. More...
Public Member Functions | |
def | __init__ (self, originX=0, originY=7, width=8, height=8, minValue=0, maxValue=255, colour=0xFFFFFF, bgColour=0x000000, colourMap="Solid", update=False, bars=False) |
Initialisation routine for the glowbit.matrix.graph2D 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 | |
width | |
height | |
colour | |
bgColour | |
update | |
m | |
offset | |
bars | |
data | |
colourMap | |
Object for drawing 2 dimensional time series graphs on GlowBit Matrix displays.
def glowbit.glowbitMatrix.graph2D.__init__ | ( | self, | |
originX = 0 , |
|||
originY = 7 , |
|||
width = 8 , |
|||
height = 8 , |
|||
minValue = 0 , |
|||
maxValue = 255 , |
|||
colour = 0xFFFFFF , |
|||
bgColour = 0x000000 , |
|||
colourMap = "Solid" , |
|||
update = False , |
|||
bars = False |
|||
) |
Initialisation routine for the glowbit.matrix.graph2D object.
A graph2D object will be drawn to a rectangular region specified by the origin, width, and height.
This graph type is explicitly designed to draw time series data.
originX | The x coordinate of the graph's origin (lower left corner). |
originY | The y coordinate of the graph's origin (lower left corner). |
width | The width, in pixels, of the graph's drawing area. |
height | The height, in pixels, of the graph's drawing area |
minValue | The value which will be mapped to the bottom edge. |
maxValue | The value which will be mapped to the upper edge. |
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. |
bgColour | A packed 32-bit GlowBit colour value which is drawn to the entire graph area prior to drawing the data. |
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 updateGraph2D() will, in turn, call glowbit.pixelsShow() to update the physical LEDs. |