bibliopixel.layout.layout module¶
-
class
bibliopixel.layout.layout.
Layout
(drivers, threadedUpdate=False, brightness=255, maker=<bibliopixel.project.data_maker.Maker object>, color_list=None, **kwds)[source]¶ Bases:
object
Base Layer class. Use Strip, Matrix, Cube, or Circle instead!
Parameters: - drivers – A list of drivers
- threadedUpdate – If True, updates to this layout are done in a separate thread
- brightness – An initial brightness value from 0 to 255
- maker – A data maker to make color_lists. TODO: Link to what a maker is.
- color_list – If non-Null, the layout uses this color_list instead of creating its own
Variables: numLEDs (int) – Total number of pixels held by this layout instance
-
CLONE_ATTRS
= ('maker', 'brightness')¶
-
clone
()[source]¶ Return an independent copy of this layout with a completely separate color_list and no drivers.
-
color_list
¶
-
dimensions
¶
-
fillRGB
(r, g, b, start=0, end=-1)[source]¶ Fill entire strip by giving individual RGB values instead of tuple
-
pre_recursion
()¶
-
push_to_driver
()[source]¶ Push the current pixel state to the driver Do not call this method from user code!
-
set_color_list
(color_list, offset=0)[source]¶ Set the internal colors starting at an optional offset.
If color_list is a list or other 1-dimensional array, it is reshaped into an N x 3 list.
If color_list too long it is truncated; if it is too short then only the initial colors are set.
-
shape
¶ Return a tuple indicating the dimensions of the layout - (x,) for a strip, (x, y) for an array, (x, y, z) for a cube, and (ring_count, ring_steps) for a circle.
-
update
()[source]¶ DEPRECATED: Use
push_to_driver()
instead Do not call this method from user code!
-
class
bibliopixel.layout.layout.
MultiLayout
(*args, gen_coord_map=None, coord_map=None, **kwds)[source]¶ Bases:
bibliopixel.layout.layout.Layout
-
CLONE_ATTRS
= ('maker', 'brightness', 'gen_coord_map', 'coord_map')¶
-