public class PwAdjustColors extends PjWorkshop
Modifier and Type | Field and Description |
---|---|
static int |
HSB
Identifier for Hue-Saturation-Brightness color representation.
|
static int |
RGB
Identifier for Red-Green-Blue color representation.
|
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwAdjustColors()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close Workshop.
|
int |
getMode()
Set color modifying mode (RGB or HSB).
|
void |
init()
Initialization.
|
static java.awt.Color[] |
modifyHSB(java.awt.Color[] col,
double hueSummand,
double saturationFactor,
double brightnessSummand,
double contrastFactor)
Modify hue, saturation and brightness values in a color array by
translation of the hue value and scaling brightness and saturation values.
|
static java.awt.Color[] |
modifyRGB(java.awt.Color[] col,
double redFactor,
double greenFactor,
double blueFactor)
Scale color red, green and blue values by given factors.
|
void |
setGeometry(PgGeometry geom)
Set geometry to work on.
|
void |
setMode(int mode)
Set color modifying mode to RGB or HSB.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
cancel, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, reset, setDisplay, setDisplays, setModal, setStandalone, setViewer
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public static final int RGB
public static final int HSB
public void init()
init
in class PjWorkshop
public void setGeometry(PgGeometry geom)
setGeometry
in interface PjWorkshopIf
setGeometry
in class PjWorkshop
geom
- the workshop modifies this geometry.public void close()
close
in class PjWorkshop
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void setMode(int mode)
setMode
in interface PjWorkshopIf
setMode
in class PjWorkshop
mode
- either MODE_STANDARD for standard mode, or MODE_BUG for debugging operations.PjWorkshopIf.MODE_STANDARD
public int getMode()
getMode
in class PjWorkshop
PjWorkshopIf.MODE_STANDARD
public static java.awt.Color[] modifyHSB(java.awt.Color[] col, double hueSummand, double saturationFactor, double brightnessSummand, double contrastFactor)
col
- Input color arrayhueSummand
- Translation for hue valuesaturationFactor
- Scaling factor for saturationbrightnessSummand
- Translation for brightnesscontrastFactor
- Scaling Factor for brightnesspublic static java.awt.Color[] modifyRGB(java.awt.Color[] col, double redFactor, double greenFactor, double blueFactor)
col
- Input color arrayredFactor
- Scaling factor for red channelgreenFactor
- Scaling factor for green channelblueFactor
- Scaling factor for blue channel"