-
class
OverlayRaster
: public Raster
(Return to index)
-
specialized Raster object for use with RasterOvComp.
Type:
Base Classes:
Derived Classes
Include file:
OverlayUnidraw/ovraster.h
Public:
-
OverlayRaster (const Raster& raster)
copy constructor
conversion constructor
-
OverlayRaster (const Raster& raster)
copy constructor
conversion constructor
-
OverlayRaster (unsigned long width, unsigned long height)
construct an empty raster ready to accept width*height of pixel values.
-
OverlayRaster ( unsigned long width, unsigned long height, unsigned long bwidth )
initialize with a border of width bwidth using the default fg/bg colors
- virtual OverlayRaster*
addgrayramp ( CopyString& cmd, IntCoord x, IntCoord y )
embed gray-level ramp in raster at given alignment, and return 'cmd'
string to reproduce this effect after save/restore.
- virtual OverlayRaster*
addgrayramp ( CopyString& cmd, RampAlignment = R_LT )
embed gray-level ramp in raster at given alignment, and return 'cmd'
string to reproduce this effect after save/restore.
- virtual OverlayRaster*
copy () const
- virtual void
flush () const
flush internal XImage data structure to a pixmap on the X server.
- virtual void
flushrect (IntCoord l, IntCoord b, IntCoord s, IntCoord t) const
flush rectangular region of internal XImage data structure
to a pixmap on the X server.
- virtual boolean
gray_flag ()
return flag that indicates this a graylevel image.
- virtual void
gray_flag (boolean flag)
set flag that indicates this a graylevel image (r==g==b).
- virtual void
graypeek (unsigned long x, unsigned long y, AttributeValue&)
- virtual void
graypeek (unsigned long x, unsigned long y, double&)
get green pixel value at 'x','y' and convert to a double.
- virtual void
graypeek (unsigned long x, unsigned long y, float&)
get green pixel value at 'x','y' and convert to a float.
- virtual void
graypeek (unsigned long x, unsigned long y, unsigned long&)
get green pixel value at 'x','y' and convert to an unsigned int.
get green pixel value at 'x','y' and convert to an unsigned long.
- virtual void
graypeek (unsigned long x, unsigned long y, unsigned long&)
get green pixel value at 'x','y' and convert to an unsigned int.
get green pixel value at 'x','y' and convert to an unsigned long.
- virtual void
graypoke (unsigned long x, unsigned long y, AttributeValue)
set rgb pixel values at 'x','y' with the contents of an AttributeValue.
- virtual void
graypoke (unsigned long x, unsigned long y, double)
set rgb pixel values at 'x','y' with a double.
- virtual void
graypoke (unsigned long x, unsigned long y, float)
set rgb pixel values at 'x','y' with a float.
- virtual void
graypoke (unsigned long x, unsigned long y, unsigned long)
set rgb pixel values at 'x','y' with an unsigned int.
set rgb pixel values at 'x','y' with an unsigned long.
- virtual void
graypoke (unsigned long x, unsigned long y, unsigned long)
set rgb pixel values at 'x','y' with an unsigned int.
set rgb pixel values at 'x','y' with an unsigned long.
- virtual boolean
grayraster ()
- virtual void
highlight (unsigned long x, unsigned long y)
saturate the red value at 'x','y' to highlight a pixel. Implemented
only in GrayRaster.
- virtual void
initialize ()
creates pixmap_ with correct data
- virtual boolean
initialized ()
- virtual void
initialized (boolean)
- virtual boolean
is_type (AttributeValue::ValueType type)
arbitrary type is not enabled in this class, only GrayRaster.
- virtual OverlayRaster*
logscale ( ColorIntensity mingray, ColorIntensity maxgray, CopyString& cmd )
create new raster logarithmically scaled between 'mingray' and 'maxgray',
and return command string to reproduce this effect after save/restore.
- virtual void
paintgrayramp ( IntCoord left, IntCoord bottom, unsigned width, unsigned height, boolean horiz )
utility method for painting the grayramp.
protected:
- virtual void
poke ( unsigned long x, unsigned long y, ColorIntensity red, ColorIntensity green, ColorIntensity blue, float alpha )
lookup Color that best matches a given 'red', 'green', 'blue', and
'alpha' value, and poke corresponding entry in the colormap into
the raster.
- virtual OverlayRaster*
pseudocolor ( ColorIntensity mingray, ColorIntensity maxgray, CopyString& cmd )
create new raster pseudo-colored between 'mingray' and 'maxgray',
and return command string to reproduce this effect after save/restore.
- virtual boolean
read (istream& in)
read pixels values written out by write method.
- virtual OverlayRaster*
scale ( ColorIntensity mingray, ColorIntensity maxgray, CopyString& cmd )
create new raster scaled between 'mingray' and 'maxgray', and return
command string to reproduce this effect after save/restore.
- virtual int
status () const
- virtual void
unhighlight ()
clear the highlighted pixels. Implemented only in GrayRaster.
- virtual boolean
write (ostream& out)
write pixel values of raster to ostream as comma-separated
parenthesized rgb triples in ASCII.
- virtual
~OverlayRaster ()
Protected:
- void
_addgrayramp ( RampAlignment algn, IntCoord w = 0, IntCoord h = 0 )
- static XColor*
_color_map
- static boolean
_gray_initialized
- static XColor*
_gray_map
- boolean
_grayflag
- boolean
_init
- static int
_unique_colors
- static int
_unique_grays
- static int
color_init (int nlevels)
setup colormap for 'nlevels' of R, G, B, i.e. if 'nlevels'==6,
the number of entries set up in the colormap is 216 (6*6*6).
- void
computeramp (boolean vert, RampAlignment, IntCoord& w, IntCoord& h)
- void
construct (const Raster&)
- static int
gray_init ()
setup colormap for viewing graylevel imagery with good rubberband
visibility.
- static int
gray_init (int nbits)
setup colormap for viewing graylevel imagery with good rubberband
visibility, using a specified number of gray-level bits.
- static boolean
gray_initialized ()
returns true if graylevel colormap has been initialized.
- static long
gray_lookup (int byte)
lookup the original gray-level value associated with a colormap entry.
- void
init_rep (unsigned long width, unsigned long height)
- virtual void
init_space ()
- virtual void
logscale ( ColorIntensity mingray, ColorIntensity maxgray )
- virtual OverlayRaster*
pseudocolor ( ColorIntensity mingray, ColorIntensity maxgray )
- RampAlignment
ramppos (IntCoord x, IntCoord y)
- virtual void
scale ( ColorIntensity mingray, ColorIntensity maxgray )
Friend methods:
(more documentation)