GlowBit.py
Public Member Functions | Public Attributes | List of all members
glowbit.glowbitMatrix.graph1D Class Reference

One dimensional graph object for graph bars on GlowBit Matrix displays. More...

Inheritance diagram for glowbit.glowbitMatrix.graph1D:
Inheritance graph
[legend]
Collaboration diagram for glowbit.glowbitMatrix.graph1D:
Collaboration graph
[legend]

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
 

Detailed Description

One dimensional graph object for graph bars on GlowBit Matrix displays.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
originXThe x coordinate of the graph's origin. The "minValue" argument will be mapped to this pixel.
originYThe y coordinate of the graph's origin. The "minValue" argument will be mapped to this pixel.
lengthThe length, in pixels, of the graph's drawing area.
directionOne of "Up", "Down", "Left", or "Right". Specifies the direction in which the graph will be drawn.
minValueThe value which will be mapped to the origin.
maxValueThe 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'.
colourA 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.
colourMapEither 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).
updateIf update=True then a call to updateGraph1D() will, in turn, call glowbit.pixelsShow() to update the physical LEDs.

The documentation for this class was generated from the following file: