UNIVERS
15.3
UNIVERS base processing software API
|
#include <ZScaledPalette.H>
Public Member Functions | |
ZScaledPalette (const ZConnect &zconnect) | |
ZScaledPalette (const ZPalette &zpal) | |
ZScaledPalette (const ZScaledPalette &zpal) | |
unsigned | coord_to_index (float coord) const |
void | index_to_coord_range (unsigned index, float coord[2]) const |
void | get_scale (FloatAr &scale) |
ColorPixel | color (float coord) const |
const char * | color_name (float coord) const |
ColorPixel & | fetch_color (float coord) |
ColorPixel & | operator[] (float coord) |
virtual void | remove_color (float coord) |
void | scale_assign (const FloatAr &scale) |
void | scale_equal_range (float mm[2]) |
virtual void | add_color (ColorPixel theColorPixel) |
virtual void | insert_color (unsigned index, ColorPixel theColorPixel) |
virtual void | remove_color (unsigned index) |
virtual void | reset_colors () |
virtual void | revert_order () |
Public Member Functions inherited from ZPalette | |
ZPalette (const ZConnect &zconnect) | |
ZPalette (const ZPalette &zpal) | |
virtual | ~ZPalette () |
virtual void | set_smooth_rate (int n=100) |
virtual void | load_palette (const char *szPalName) |
virtual void | append_palette (const char *szPalName) |
virtual void | add_color (const char *szColorName) |
virtual void | add_color (float rgb[3]) |
virtual void | insert_color (unsigned index, const char *szColorName) |
virtual void | insert_color (unsigned index, float rgb[3]) |
unsigned | colors_count () const |
ColorPixel | color (unsigned index) const |
const char * | color_name (unsigned index) const |
ColorPixel & | fetch_color (unsigned index) |
ColorPixel & | operator[] (unsigned index) |
Pixmap | draw_palette (const ZSize &zs, Logic bReverse=FALSE, ZDimension dim=zdHorizontal) const |
Public Member Functions inherited from ZConnect | |
ZConnect (Display *display) | |
ZConnect (const ZConnect &zconnect) | |
void | flush () |
void | x_error (int code) const |
ZRect | rect (Drawable drawable) const |
virtual ZRect | rect () const |
int | depth (Drawable drawable) const |
Window | root_wid () const |
ColorPixel | white () const |
ColorPixel | black () const |
ColorPixel | color (const char *szColorName) const |
Protected Attributes | |
FloatAr | rb |
Protected Attributes inherited from ZPalette | |
int | nSmooth |
Additional Inherited Members | |
Public Attributes inherited from ZConnect | |
Display * | dpy |
ScreenNo | scr_no |
Color palette with real coordinate scale.
ZScaledPalette::ZScaledPalette | ( | const ZConnect & | zconnect | ) |
Create empty palette - the only black color for all spectra
ZScaledPalette::ZScaledPalette | ( | const ZPalette & | zpal | ) |
Create copy of the palette
ZScaledPalette::ZScaledPalette | ( | const ZScaledPalette & | zpal | ) |
Create copy of the palette
|
virtual |
Add color in palette (at the end)
Reimplemented from ZPalette.
ColorPixel ZScaledPalette::color | ( | float | coord | ) | const |
Get color by coordinate
const char* ZScaledPalette::color_name | ( | float | coord | ) | const |
Get color name by coordinate
unsigned ZScaledPalette::coord_to_index | ( | float | coord | ) | const |
Get index by a coord
ColorPixel& ZScaledPalette::fetch_color | ( | float | coord | ) |
Get or change color by index
void ZScaledPalette::get_scale | ( | FloatAr & | scale | ) |
Get defined distribution of ranges to external array
void ZScaledPalette::index_to_coord_range | ( | unsigned | index, |
float | coord[2] | ||
) | const |
Get coord range by an index [0..colors_count()-2]
|
virtual |
Insert color before pointed index
Reimplemented from ZPalette.
|
virtual |
Delete color on given coordinate
|
virtual |
Add several colors to fit the gradient from one given color to another. Delete color at pointed index
Reimplemented from ZPalette.
|
virtual |
Delete all colors
Reimplemented from ZPalette.
|
virtual |
Revert order of colors
Reimplemented from ZPalette.
void ZScaledPalette::scale_assign | ( | const FloatAr & | scale | ) |
Copying externally defined distribution of ranges
void ZScaledPalette::scale_equal_range | ( | float | mm[2] | ) |
Builds scaling with equal ranges from mm[0] to mm[1]
|
protected |
Range bounds