RegionObject Class Reference

A shaded rectangular object. More...

#include <RegionObject.h>

Inheritance diagram for RegionObject:

Inheritance graph

List of all members.

Public Member Functions

virtual bool isValid () const =0
virtual void setRegion (double dMinX, double dMinY, double dMaxX, double dMaxY)=0
virtual bool getRegion (double &minX, double &minY, double &maxX, double &maxY) const =0
virtual bool isSolidColor () const =0
virtual void setColor (const ColorType &regionColor)=0
virtual void setColors (const std::vector< ColorType > &colors)=0
virtual ColorType getColor () const =0
virtual const std::vector
< ColorType > & 
getColors () const =0
virtual void setTransparency (int iTransparency)=0
virtual int getTransparency () const =0
virtual void setDrawBorder (bool bBorder)=0
virtual bool getDrawBorder () const =0

Static Public Member Functions

static const std::string & signalRegionChanged ()
static const std::string & signalColorsChanged ()
static const std::string & signalTransparencyChanged ()
static const std::string & signalBorderToggled ()

Protected Member Functions

virtual ~RegionObject ()


Detailed Description

A shaded rectangular object.

The region plot object provides a shaded rectanuglar area with a transparency value. The shading can be solid with a single color, or a gradient with multiple colors.

This subclass of Subject will notify upon the following conditions:

See also:
PlotObject

Definition at line 35 of file RegionObject.h.


Constructor & Destructor Documentation

virtual RegionObject::~RegionObject (  )  [protected, virtual]

This should be destroyed by calling PlotView::deleteObject.

Definition at line 220 of file RegionObject.h.


Member Function Documentation

static const std::string& RegionObject::signalRegionChanged (  )  [static]

Emitted with any<boost::tuple<double,double,double,double> > when the region boundary is changed.

The values in the tuple are minX, minY, maxX and maxY respectively.

Definition at line 43 of file RegionObject.h.

static const std::string& RegionObject::signalColorsChanged (  )  [static]

Emitted with any<vector<ColorType> when the colors of the region are changed.

Definition at line 47 of file RegionObject.h.

static const std::string& RegionObject::signalTransparencyChanged (  )  [static]

Emitted with any<int> when the opacity is changed.

The value represents the opacity, ranging from 0 to 255.

Definition at line 52 of file RegionObject.h.

static const std::string& RegionObject::signalBorderToggled (  )  [static]

Emitted with any<bool> when the border is enabled or disabled.

Definition at line 56 of file RegionObject.h.

virtual bool RegionObject::isValid (  )  const [pure virtual]

Queries whether the region has valid values.

A region, when it is first created, is invalid. A region becomes valid when its values are set such that both the width and height are not zero.

Returns:
True if the region has valid values, or false if the values are invalid.
See also:
setRegion()

virtual void RegionObject::setRegion ( double  dMinX,
double  dMinY,
double  dMaxX,
double  dMaxY 
) [pure virtual]

Sets the region location.

This method sets the region location by specifying the minimum and maximum coordinate extents. The region can be obtained by getting the extents of the object.

Parameters:
dMinX The new minimum x-coordinate value.
dMinY The new minimum y-coordinate value.
dMaxX The new maximum x-coordinate value.
dMaxY The new maximum y-coordinate value.
Subject Notifications:
This method will notify signalRegionChanged with any<boost::tuple<double,double,double,double> >.
See also:
PlotObject::getExtents()

virtual bool RegionObject::getRegion ( double &  minX,
double &  minY,
double &  maxX,
double &  maxY 
) const [pure virtual]

Get the data coordinates for the region.

Parameters:
minX The minimum x-coordinate. This will set by this method.
minY The minimum y-coordinate. This will set by this method.
maxX The maximum x-coordinate. This will set by this method.
maxY The maximum y-coordinate. This will set by this method.
Returns:
True if the operation was a success, false otherwise.

virtual bool RegionObject::isSolidColor (  )  const [pure virtual]

Queries whether a single, solid color is used.

Returns:
True if the region is using a single color, otherwise false.
See also:
getColor()

virtual void RegionObject::setColor ( const ColorType regionColor  )  [pure virtual]

Sets the region to have a single, solid color.

Parameters:
regionColor The new region color. Must be a valid color.
Subject Notifications:
This method will notify signalColorsChanged with vector<ColorType>. The vector will have only one color.
See also:
ColorType::isValid()

virtual void RegionObject::setColors ( const std::vector< ColorType > &  colors  )  [pure virtual]

Set the region colors.

The colors will be drawn in order from the minimum x-coordinate extent to the maximum x-coordinate extent.

Parameters:
colors The colors to be drawn, in order.
Subject Notifications:
This method will notify signalColorsChanged with vector<ColorType>.

virtual ColorType RegionObject::getColor (  )  const [pure virtual]

Returns the region color.

This method returns the region color if the region is displayed as a single, solid color.

Returns:
The current region color. The color is invalid if the region uses multiple colors.
See also:
ColorType::isValid(), getColors()

virtual const std::vector<ColorType>& RegionObject::getColors (  )  const [pure virtual]

Returns the region colors.

Returns:
A reference to vector containing the region colors, in order. The vector is valid if the region uses a single color.

virtual void RegionObject::setTransparency ( int  iTransparency  )  [pure virtual]

Sets the region transparency value.

The region can be set to be transparent or semi-transparent by setting its transparency value. Valid values range from 0 to 255, with the 0 value being fully transparent and the 255 value being fully opaque. The default value is 255. When the region is displaying a colormap, this value will be applied as a multiplier on the transparency values of each value in the colormap.

Parameters:
iTransparency The new transparency value. Valid values range from 0 to 255.
Subject Notifications:
This method will notify signalTransparencyChanged with any<int>.
See also:
setColors()

virtual int RegionObject::getTransparency (  )  const [pure virtual]

Returns the region transparency value.

Returns:
The current region transparency value.
See also:
setTransparency()

virtual void RegionObject::setDrawBorder ( bool  bBorder  )  [pure virtual]

Toggles the region border.

This method sets whether a black border is drawn around the region. The object defaults to not draw the border.

Parameters:
bBorder Set this value to true to draw a black border around the object.
Subject Notifications:
This method will notify signalBorderToggled with any<bool>.

virtual bool RegionObject::getDrawBorder (  )  const [pure virtual]

Queries whether the region border is drawn.

Returns:
True if the border is drawn, otherwise false.
See also:
setDrawBorder()


Software Development Kit - Opticks 4.9.0 Build 16218