28 #ifndef TRIALDISPLAY_PSPIXELCANVASCOLORTABLE_H
29 #define TRIALDISPLAY_PSPIXELCANVASCOLORTABLE_H
269 float &red,
float &green,
float &blue);
271 float &red,
float &green,
float &blue);
281 const float r,
const float g,
const float b);
298 friend casacore::ostream &
operator << (casacore::ostream & os,
323 int allocColor_(
const float r,
const float g,
const float b,
int &index);
virtual void mapToColor3(casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in)
(Multichannel Color) Merge separate channel data into an output image.
virtual casacore::Bool installRGBColors(const casacore::Vector< casacore::Float > &r, const casacore::Vector< casacore::Float > &g, const casacore::Vector< casacore::Float > &b, const casacore::Vector< casacore::Float > &alpha, casacore::uInt offset=0)
Install colors into the color table.
Abstract interface to underlying graphics library's colortable.
casacore::Bool storeColor(const int index, const float r, const float g, const float b)
Sets the contents of colormap at the given index.
virtual ~PSPixelCanvasColorTable()
casacore::Bool queryColor(const int index, float &r, float &g, float &b)
Return contents of colormap at the given index.
virtual casacore::uInt nSpareColors() const
Return the number of colors that are still unallocated.
Display::ColorModel colorModel() const
Return the color model for multichannel color.
Low level interface between PSPixelCanvas{ColorTable} and PostScript.
PSPixelCanvasColorTable()
PSDriver * getPSDriver() const
casacore::uInt bpc_
Number of bits/per component.
casacore::Bool lookupROColor(const float r, const float g, const float b, int &index)
Finds the index of a color triple coming 'close' to the RGB args.
casacore::Bool allocated_[NUMROCOLORS]
true if index has been allocated.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
virtual void setColorModel(const Display::ColorModel)
Changeable at any time.
casacore::Bool annotate() const
Whether to put tracing comments in the output.
void pspcinit(PSDriver *ps, const Display::ColorModel)
virtual casacore::Bool resize(casacore::uInt newSize)
Resize the map if allowed.
void deallocate(casacore::uLong index)
Mark a RO color as unallocated.
virtual casacore::uInt depth() const
Return the depth in bits of the colors.
casacore::uInt maxColors() const
Maximum number of colors in color table.
static void componentsToPixel(const casacore::uShort r, const casacore::uShort g, casacore::uShort &b, casacore::uLong &pixel)
Pack RGB or HSV color components into a single unsigned long.
int allocColor_(const float r, const float g, const float b, int &index)
casacore::uInt nColors_
(Valid Always) number of total colors available.
void annotate(const casacore::Bool a)
float red_[INDEXCOLORS]
Copies of the color table.
bool Bool
Define the standard types used by Casacore.
casacore::Bool allocColor(const float r, const float g, const float b, int &index)
Allocate the color value in the color table.
casacore::Bool lookupRWColor(const float r, const float g, const float b, int &index)
friend casacore::ostream & operator<<(casacore::ostream &os, const PSPixelCanvasColorTable &pcc)
print details of class to ostream
Display::ColorModel colorModel_
(Valid Always) The colormodel that this PSPixelCanvasColorTable is currently configured as...
casacore::uInt numComponents() const
Returns the current # of color components (1 for Indexed, 3 for RGB/HSV).
Describes a method of generating a table of colors.
static void pixelToComponents(const casacore::uLong pixel, casacore::uShort &r, casacore::uShort &g, casacore::uShort &b)
Convert a packed pixel (from mapToColor3) to three color components.
float green_[INDEXCOLORS]
virtual casacore::Bool colorSpaceMap(Display::ColorModel, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in, casacore::Array< casacore::Float > &chan1out, casacore::Array< casacore::Float > &chan2out, casacore::Array< casacore::Float > &chan3out)
(Multichannel Color) Transform arrays from the passed color model into the colormodel of the PSPCCT...
String: the storage and methods of handling collections of characters.
virtual void mapToColor(const Colormap *map, casacore::Array< casacore::uChar > &outArray, const casacore::Array< casacore::uChar > &inArray, casacore::Bool rangeCheck=true) const
map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigne...
void mapFromColor3(const casacore::Array< casacore::uLong > &inArray, casacore::Array< casacore::uShort > &outArray) const
Convert from a packed array of RGB triples to an array of color values.
static casacore::Bool parseColor(const char *name, float &red, float &green, float &blue)
X11 emulation routines.
Implementation of PixelCanvasColorTable for PostScript device.
ColorModel
Different ways of handling color on the display.
virtual casacore::uInt nColors() const
Return the number of colors used to make the map.