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_TAGSMODE_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, setVieweraddInspector, 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, updatePanelsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFather, getName, setParentpublic static final int RGB
public static final int HSB
public void init()
init in class PjWorkshoppublic void setGeometry(PgGeometry geom)
setGeometry in interface PjWorkshopIfsetGeometry in class PjWorkshopgeom - the workshop modifies this geometry.public void close()
close in class PjWorkshoppublic boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PjWorkshopevent - sender of this update.PsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public void setMode(int mode)
setMode in interface PjWorkshopIfsetMode in class PjWorkshopmode - either MODE_STANDARD for standard mode, or MODE_BUG for debugging operations.PjWorkshopIf.MODE_STANDARDpublic int getMode()
getMode in class PjWorkshopPjWorkshopIf.MODE_STANDARDpublic 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"