UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
ZScaledPalette Class Reference

#include <ZScaledPalette.H>

Inheritance diagram for ZScaledPalette:
ZPalette ZConnect ZtColoredMatrix ZtSeismicTrace

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
 

Detailed Description

Color palette with real coordinate scale.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void ZScaledPalette::add_color ( ColorPixel  theColorPixel)
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 void ZScaledPalette::insert_color ( unsigned  index,
ColorPixel  theColorPixel 
)
virtual

Insert color before pointed index

Reimplemented from ZPalette.

virtual void ZScaledPalette::remove_color ( float  coord)
virtual

Delete color on given coordinate

virtual void ZScaledPalette::remove_color ( unsigned  index)
virtual

Add several colors to fit the gradient from one given color to another. Delete color at pointed index

Reimplemented from ZPalette.

virtual void ZScaledPalette::reset_colors ( )
virtual

Delete all colors

Reimplemented from ZPalette.

virtual void ZScaledPalette::revert_order ( )
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]

Member Data Documentation

FloatAr ZScaledPalette::rb
protected

Range bounds


The documentation for this class was generated from the following file: