public abstract class LXLayeredComponent extends LXModelComponent implements LXLoopTask
Modifier and Type | Class and Description |
---|---|
static interface |
LXLayeredComponent.Buffered
Marker interface for instances which own their own buffer.
|
LXModulatorComponent.Profiler
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
protected int[] |
colors |
protected List<LXLayer> |
layers |
protected LXPalette |
palette |
model
modulators, profiler
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Modifier | Constructor and Description |
---|---|
protected |
LXLayeredComponent(LX lx) |
protected |
LXLayeredComponent(LX lx,
LXBuffer buffer) |
protected |
LXLayeredComponent(LX lx,
LXDeviceComponent component) |
protected |
LXLayeredComponent(LX lx,
String label) |
protected |
LXLayeredComponent(LX lx,
String label,
LXBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
protected LXLayeredComponent |
addColor(int i,
int c)
Adds to the color of point i, using blendColor with ADD
|
protected LXLayeredComponent |
addColor(LXModel model,
int c)
Adds the color to the fixture
|
protected LXLayer |
addLayer(LXLayer layer) |
protected void |
afterLayers(double deltaMs) |
protected LXLayeredComponent |
blendColor(int i,
int c,
LXColor.Blend blendMode)
Blend the color at index i with its existing value
|
protected LXLayeredComponent |
blendColor(LXModel model,
int c,
LXColor.Blend blendMode) |
protected LXLayeredComponent |
clearColors()
Clears all colors
|
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
protected LXBuffer |
getBuffer() |
protected int |
getColor(int i)
Retrieves the color at index i.
|
protected int |
getColor(LXPoint p)
Retrieves the color at a given point.
|
int[] |
getColors() |
List<LXLayer> |
getLayers() |
void |
loop(double deltaMs) |
protected void |
onLoop(double deltaMs) |
protected LXLayer |
removeLayer(LXLayer layer) |
LXLayeredComponent |
setBuffer(LXBuffer buffer) |
protected LXLayeredComponent |
setBuffer(LXDeviceComponent component) |
protected LXLayeredComponent |
setColor(int i,
int c)
Sets the color of point i
|
protected LXLayeredComponent |
setColor(LXModel model,
int c)
Sets the color of all points in a fixture
|
protected LXLayeredComponent |
setColor(LXPoint p,
int c)
Sets the color of a point.
|
protected LXLayeredComponent |
setColors(int c)
Sets all points to one color
|
protected LXLayeredComponent |
subtractColor(int i,
int c)
Subtracts from the color of point i, using blendColor with SUBTRACT
|
getModel, onModelChanged, setModel
addModulator, addModulator, addModulator, constructProfiler, getModulator, getModulators, moveModulator, removeModulator, startModulator
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, load, loadParameters, onParameterChanged, removeParameter, removeParameter, save, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
protected int[] colors
protected final LXPalette palette
protected LXLayeredComponent(LX lx)
protected LXLayeredComponent(LX lx, LXDeviceComponent component)
protected LXBuffer getBuffer()
public int[] getColors()
protected LXLayeredComponent setBuffer(LXDeviceComponent component)
public LXLayeredComponent setBuffer(LXBuffer buffer)
public void loop(double deltaMs)
loop
in interface LXLoopTask
loop
in class LXModelComponent
protected void onLoop(double deltaMs)
protected void afterLayers(double deltaMs)
public void dispose()
LXComponent
super.dispose()
at the appropriate
time to perform the basic cleanup, which may need to happen either before or after cleaning
up other objects.dispose
in class LXModulatorComponent
protected int getColor(int i)
i
- Color indexprotected int getColor(LXPoint p)
p
- Pointprotected final LXLayeredComponent setColor(int i, int c)
i
- Point indexc
- colorprotected final LXLayeredComponent setColor(LXPoint p, int c)
p
- Pointc
- colorprotected final LXLayeredComponent blendColor(int i, int c, LXColor.Blend blendMode)
i
- Indexc
- New colorblendMode
- blending modeprotected final LXLayeredComponent blendColor(LXModel model, int c, LXColor.Blend blendMode)
protected final LXLayeredComponent addColor(int i, int c)
i
- Point indexc
- colorprotected final LXLayeredComponent addColor(LXModel model, int c)
model
- modelc
- New colorprotected final LXLayeredComponent subtractColor(int i, int c)
i
- Point indexc
- colorprotected final LXLayeredComponent setColors(int c)
c
- Colorprotected final LXLayeredComponent setColor(LXModel model, int c)
model
- Modelc
- colorprotected final LXLayeredComponent clearColors()
LX library by Mark C. Slee. © 2012-2020