bibliopixel.layout.cutter module¶
Cut matrices by row or column and apply operations to them.
-
class
bibliopixel.layout.cutter.Cutter(layout, by_row=True)[source]¶ Bases:
objectBase class that pre-calculates cuts and can use them to apply a function to the layout.
Each “cut” is a row or column, depending on the value of by_row.
The entries are iterated forward or backwards, depending on the value of forward.
-
class
bibliopixel.layout.cutter.Indexer(layout, by_row=True)[source]¶ Bases:
bibliopixel.layout.cutter.CutterSlower implementation of Cutter that uses lists of indices and the Matrix interface.
-
class
bibliopixel.layout.cutter.Slicer(layout, by_row=True)[source]¶ Bases:
bibliopixel.layout.cutter.CutterImplementation of Cutter that uses slices of the underlying colorlist. Does not work if the Matrix layout is serpentine or has any reflections or rotations.