casa::WorldCanvas Class Reference
[Display]

#include <WorldCanvas.h>

Inheritance diagram for casa::WorldCanvas:

Inheritance graph
[legend]
Collaboration diagram for casa::WorldCanvas:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of drawing in world coordinates on top of a PixelCanvas.

Prerequisite

Etymology

WorldCanvas is a canvas on which primitives specified in world coordinates are drawn.

Synopsis

The world canvas manages a portion of a PixelCanvas and provides mechanisms to allow the user to draw images and vectors in world coordinates. The position of the WorldCanvas may be dynamically changed.

The WorldCanvas vector graphics commands assume world coordinates are specified and use a registered coordinate handler to map those coordinates via a linear system to pixel coordinates. The pixel coordinates are then sent on to the PixelCanvas where they are plotted.

Images are drawn by sending a Matrix and specifying the world-coordinate location of the center of the lower-left pixel. If the dataMin and dataMax values have been set, they will be used to scale the data, otherwise the min and max will be scanned.

Customizable tools associated with the WorldCanvas available to assist with various aspects of display.

The interface for these tools are implemented as abstract base classes, and the tools are implemented by deriving from these classes and overriding the functions contained therein.

The WorldCanvas provides an interface to the PixelCanvas caching mechanism. Clever use of caching and parsing of the reason field of a WCRefreshEvent can reduce unnecessary recomputation needed for refreshing the screen.

The WorldCanvas maintains a set of Attribute s which the user can set on the WorldCanvas. An Attribute is a combination of a name and a value, the value can be of type uInt, Int, Float, Double, Bool and String, and Vectors of these. These Attributes serve two purposes: 1) to allow to place (using the member functions setAttribute and setAttributes) more or less arbitrary information on the WorldCanvas that other classes can read from the WorldCanvas. Since the name of an Attribute can be defined at run time, any name can be used (i.e. there is no pre-defined set of names that can only be used), and 2) to have a generic interface to some of the internal variables of the WorldCanvas. Some internal variabels can be set/read with their own interface routine (e.g. linXMin and friends using setZoomRectangleLCS), but they can also be modified/read using the Attribute interface (using getAttributeValue). The use of e.g. SetZoomRectangleLCS() and setAttribute() is equivalent. See AttributeBuffer for more details. The following Attributes (and their types) are pre-defined on the WorldCanvas and can be accessed using the Attribute interface (note: these Attributes cannot be deleted using removeAttribute()):

The WorldCanvas knows three coordinate systems.

Motivation

Wanted a world-coordinate plotting canvas

Example

See the test programs in Display/test

To Do

Definition at line 204 of file WorldCanvas.h.

Public Member Functions

 WorldCanvas (PixelCanvas *pc, Double xOrigin=0.0, Double yOrigin=0.0, Double xSize=1.0, Double ySize=1.0)
 Construct a WorldCanvas on the given PixelCanvas, at the given origin (in fractions of the PixelCanvas extent), and having the given size (in the same units).
virtual ~WorldCanvas ()
 Destructor.
PixelCanvaspixelCanvas () const
 Return a pointer to the PixelCanvas on which this WorldCanvas is installed.
virtual void handleEvent (DisplayEvent &ev)
 Handle other, generic types of events.
void refresh (const Display::RefreshReason &reason=Display::UserCommand, const Bool &explicitrequest=True)
 Refresh the WorldCanvas for the given reason.
Bool refreshAllowed ()
 Is a refresh currently allowed?
void setWorldCanvasPosition (Double fracXOffset, Double fracYOffset, Double fracXSize, Double fracYSize)
 Set the location of the WorldCanvas on its PixelCanvas.
virtual void setDefaultOptions ()
 Install the default options for this DisplayData.
virtual Bool setOptions (const Record &rec, Record &updatedOptions)
 Apply options stored in rec to the DisplayData; return value True means a refresh is needed.
virtual Record getOptions () const
 Retrieve the current and default options and parameter types.
void removeAttribute (String &name)
 Remove an Attribute.
Bool existsAttribute (String &name) const
 Check if a certain Attribute exists.
AttValue::ValueType attributeType (String &name) const
 Get the type of an Attribute.
virtual Int pgid () const
 Return the PGPLOT device id for external use.
Bool drawText (const Vector< Double > &point, const String &text, Display::TextAlign alignment=Display::AlignCenter, const Bool &linear=False)
 Draw unrotated text at the given position.
Bool drawPoint (const Vector< Double > &point, const Bool &linear=False)
 Draw a single point using the current color.
Bool drawLine (const Vector< Double > &a, const Vector< Double > &b, const Bool &linear=False)
 Draw a single line using the current color.
Bool drawPoints (const Matrix< Double > &points, const Bool &linear=False)
 Draw a bunch of points using the current color.
Bool drawPoints (const Vector< Float > &px, const Vector< Float > &py, Bool linear=False)
 Draw a set of points using the current color.
Bool drawTextStrings (const Vector< Float > &px, const Vector< Float > &py, const Vector< String > &strings, const Float rotation=0.0, const Float xoffset=0.0, const Float yoffset=0.0, const Bool linear=False)
 Draw a set of text strings using the current color.
Bool drawMarkers (const Vector< Float > &px, const Vector< Float > &py, const Display::Marker=Display::Cross, const Int size=5, const Bool &linear=False)
 Draw a set of markers using the current color and a given pixel size.
Bool drawMappedMarkers (const Vector< Float > &px, const Vector< Float > &py, const Vector< Float > &values, const Int sizemin=1, const Int sizemax=20, const Display::Marker=Display::Cross, const Bool &linear=False)
Bool drawLines (const Matrix< Double > &vertices, const Bool &linear=False)
 Draw pairs of lines using the current color.
Bool drawPolyline (const Matrix< Double > &vertices, const Bool &linear=False)
 Draw a polyline (connected line) between the vertices using the current color.
Bool drawPolygon (const Matrix< Double > &vertices, const Bool &linear=False)
 Draw a polygon (closed line, or line loop using the points) using the current color.
Bool drawColormappedPoints (const Matrix< Double > &points, const Vector< Float > &values, const Bool &linear=False)
 Draw a set of points in colors which are taken from the current Colormap.
Bool drawColormappedEllipses (const Matrix< Double > &centres, const Vector< Float > &smajor, const Vector< Float > &sminor, const Vector< Float > &pangle, const Vector< Float > &colors, const Float &scale=1.0, const Bool &outline=True, const Bool &linear=False)
 Draw a set of colored ellipses, possibly with outlines.
Bool drawBeamEllipse (Float major, Float minor, Float pa, String majunit="arcsec", String minunit="arcsec", String paunit="deg", Float cx=.1f, Float cy=.1f, Bool outline=True)
 This routine is specialized for drawing image restoring-beam ellipses.
Bool redrawIndexedImage (void *drawObj, Display::RefreshReason reason, Bool opaqueMask=False)
 Optimization to speed up colormap fiddling in 24bit mode (software Colormap); see images_, below for usage.
Bool removeIndexedImage (void *drawObj)
 Remove image from the colormap change cache, if any (see images_, below).
void clearColormapChangeCache ()
 Clear the whole colormap change cache (see images_, below).
void flushComponentImages ()
 Flush the component images, ie.
void setZoomRectangleLCS (const Vector< Double > &min, const Vector< Double > &max)
 Set the zoom rectangle to the specfied linear coordinate range.
void moveZoomRectangleLCS (double dx, double dy)
 Move the zoom rectangle across the screen, ie.
void resetZoomRectangle ()
 Reset the zoom to show the entire allowable range of the linear coordinate system.
void setLinearCoordinateSystem (const Vector< Double > &blc, const Vector< Double > &trc, Bool resetZoom=True)
 Set the allowable range of the linear coordinate system.
void addRefreshEventHandler (DisplayEH &eh)
 Add the given refresh, motion and position event handlers to the WorldCanvas.
void addMotionEventHandler (WCMotionEH &eh)
void addPositionEventHandler (WCPositionEH &eh)
void removeRefreshEventHandler (const DisplayEH &eh)
 Remove the given refresh, motion and position event handlers from the WorldCanvas.
void removeMotionEventHandler (const WCMotionEH &eh)
void removePositionEventHandler (const WCPositionEH &eh)
void callMotionEventHandlers (const WCMotionEvent &ev)
 Call all of the motion and position event handlers that are installed on the WorldCanvas.
void callPositionEventHandlers (const WCPositionEvent &ev)
void operator() (const PCRefreshEvent &pev)
 Handle implicit refresh, motion and position events occuring on the PixelCanvas on which this WorldCanvas is installed.
void operator() (const PCMotionEvent &pev)
 Default just prints the event to cout.
void operator() (const PCPositionEvent &pev)
 Default just prints the event to cout.
void hold ()
 Hold and release response to refreshes requested with the refresh() member function.
void release ()
void setCoordinateHandler (WCCoordinateHandler *ch)
 Set Coordinate, SizeControl, Resample and DataScale handlers for the WorldCanvas.
void setSizeControlHandler (WCSizeControlHandler *sh)
void setResampleHandler (WCResampleHandler *rh)
void setDataScaleHandler (WCDataScaleHandler *sh)
Bool pixToLin (Vector< Double > &lin, const Vector< Double > &pix)
 Pixel, linear and world coordinate transformation functions.
Bool pixToLin (Matrix< Double > &lin, Vector< Bool > &failures, const Matrix< Double > &pix)
Bool linToPix (Vector< Double > &pix, const Vector< Double > &lin)
Bool linToPix (Matrix< Double > &pix, Vector< Bool > &failures, const Matrix< Double > &lin)
Bool linToWorld (Vector< Double > &world, const Vector< Double > &lin)
Bool linToWorld (Matrix< Double > &world, Vector< Bool > &failures, const Matrix< Double > &lin)
Bool worldToLin (Vector< Double > &lin, const Vector< Double > &world)
Bool worldToLin (Matrix< Double > &lin, Vector< Bool > &failures, const Matrix< Double > &world)
Bool pixToWorld (Vector< Double > &world, const Vector< Double > &pix)
Bool pixToWorld (Matrix< Double > &world, Vector< Bool > &failures, const Matrix< Double > &pix)
Bool worldToPix (Vector< Double > &pix, const Vector< Double > &world)
Bool worldToPix (Matrix< Double > &pix, Vector< Bool > &failures, const Matrix< Double > &world)
void registerColormap (Colormap *cmap, Float weight=1.0)
 Register/unregister a Colormap on the PixelCanvas.
void registerColormap (Colormap *cmap, Colormap *cmapToReplace)
void unregisterColormap (Colormap *cmap)
void setColormap (Colormap *cmap)
 Set and retrieve the current Colormap on the PixelCanvas.
Colormapcolormap () const
uInt newList ()
 Display list support functions.
void endList ()
void drawList (uInt list)
void deleteList (uInt list)
void deleteLists ()
Bool validList (uInt list)
void setColor (const String &color)
 Set various graphics attributes.
void setClearColor (const String &color)
Bool setFont (const String &fontName)
void setForeground (uLong color)
void setBackground (uLong color)
void setLineWidth (Float width)
void setLineStyle (Display::LineStyle style)
void setCapStyle (Display::CapStyle style)
void setJoinStyle (Display::JoinStyle style)
void setFillStyle (Display::FillStyle style)
void setFillRule (Display::FillRule rule)
void setArcMode (Display::ArcMode mode)
Bool setWorldBackgroundColor (const String color)
 Set/retrieve the background and foreground colors of the WorldCanvas.
Bool setWorldForegroundColor (const String color)
String getWorldBackgroundColor ()
String getWorldForegroundColor ()
virtual void setDrawBuffer (Display::DrawBuffer buf)
 Set/retrieve the drawing buffer, the target destination for graphics.
Display::DrawBuffer drawBuffer () const
void setImageCacheStrategy (Display::ImageCacheStrategy strategy)
 Set/retrieve the caching strategy on the PixelCanvas.
Display::ImageCacheStrategy imageCacheStrategy () const
void clear ()
 Clear the WorldCanvas, or just the area on the WorldCanvas but outside the drawing area, ie.
void clearNonDrawArea ()
void setAttribute (Attribute &at)
 Set an Attribute or Attributes on the WorldCanvas.
void setAttributes (AttributeBuffer &at)
Bool getAttributeValue (const String &name, uInt &newValue) const
 User interface to get individual values from the attribute buffer.
Bool getAttributeValue (const String &name, Int &newValue) const
Bool getAttributeValue (const String &name, Float &newValue) const
Bool getAttributeValue (const String &name, Double &newValue) const
Bool getAttributeValue (const String &name, Bool &newValue) const
Bool getAttributeValue (const String &name, String &newValue) const
Bool getAttributeValue (const String &name, Vector< uInt > &newValue) const
Bool getAttributeValue (const String &name, Vector< Int > &newValue) const
Bool getAttributeValue (const String &name, Vector< Float > &newValue) const
Bool getAttributeValue (const String &name, Vector< Double > &newValue) const
Bool getAttributeValue (const String &name, Vector< Bool > &newValue) const
Bool getAttributeValue (const String &name, Vector< String > &newValue) const
virtual void acquirePGPLOTdevice (const Bool &linear=True)
 Position the PGPLOT filter on the WorldCanvas.
virtual void releasePGPLOTdevice ()
void drawContourMap (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Float > &data, const Vector< Float > &levels, const Bool usePixelEdges=False)
 Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
void drawContourMap (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Complex > &data, const Vector< Float > &levels, const Bool usePixelEdges=False)
void drawContourMap (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Float > &data, const Matrix< Bool > &mask, const Vector< Float > &levels, const Bool usePixelEdges=False)
 Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
void drawContourMap (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Complex > &data, const Matrix< Bool > &mask, const Vector< Float > &levels, const Bool usePixelEdges=False)
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Float > &data, const Bool usePixelEdges=False, void *drawObj=0)
 Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Complex > &data, const Bool usePixelEdges=False, void *drawObj=0)
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Float > &data, const Matrix< Bool > &mask, const Bool usePixelEdges=False, void *drawObj=0, Bool opaqueMask=False)
 Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Complex > &data, const Matrix< Bool > &mask, const Bool usePixelEdges=False, void *drawObj=0, Bool opaqueMask=False)
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Float > &data, const Display::ColorComponent &colorcomponent, const Bool usePixelEdges=False)
 Draw a component of a multi-channel image, mapping data values to component levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
void drawImage (const Vector< Double > &blPos, const Vector< Double > &trPos, const Matrix< Complex > &data, const Display::ColorComponent &colorcomponent, const Bool usePixelEdges=False)
void drawVectorMap (const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Complex > &data, const Matrix< Bool > &mask, Float angleConversionFactor, Float phasePolarity, Bool debias, Float variance, Int xPixelInc, Int yPixelInc, Float scale, Bool arrow, Float barb, Float rotation, Double xWorldInc, Double yWorldInc, const Bool usePixelEdges)
 Draw a vector map.
void drawVectorMap (const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Float > &data, const Matrix< Bool > &mask, Float angleConversionFactor, Float phasePolarity, Bool debias, Float variance, Int xPixelInc, Int yPixelInc, Float scale, Bool arrow, Float barb, Float rotation, Double xWorldInc, Double yWorldInc, const Bool usePixelEdges)
void drawMarkerMap (const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Float > &data, const Matrix< Bool > &mask, Int xPixelInc, Int yPixelInc, Float scale, Double xWorldInc, Double yWorldInc, const String &markeType, Bool usePixelEdges)
 Draw marker maps.
void drawMarkerMap (const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Complex > &data, const Matrix< Bool > &mask, Int xPixelInc, Int yPixelInc, Float scale, Double xWorldInc, Double yWorldInc, const String &markerType, Bool usePixelEdges)
void copyBackBufferToFrontBuffer ()
 Buffer memory exchanges which operate only on the area of the WorldCanvas.
void copyFrontBufferToBackBuffer ()
void swapBuffers ()
Double linXMin () const
 Provide information on the extents of the linear coordinate system.
Double linYMin () const
Double linXMax () const
Double linYMax () const
Double linXMinLimit () const
 Provide information on the limits of the linear coordinate system.
Double linYMinLimit () const
Double linXMaxLimit () const
Double linYMaxLimit () const
uInt canvasXOffset () const
 Provide information on the WorldCanvas offset and size.
uInt canvasYOffset () const
uInt canvasXSize () const
uInt canvasYSize () const
uInt canvasDrawXOffset () const
 Provide information on the WorldCanvas drawable offset and size.
uInt canvasDrawYOffset () const
uInt canvasDrawXSize () const
uInt canvasDrawYSize () const
Double dataMin () const
 Functions to set and retrieve the minimum and maximum data values for scaling data that is drawn on the WorldCanvas.
void setDataMin (Double min)
Double dataMax () const
void setDataMax (Double max)
void setDataMinMax (Double min, Double max)
Display::ComplexToRealMethod complexToRealMethod () const
 ComplexToRealMethod defines which real component of a Complex image to extract when it is necessary to convert Complex data into real data.
void setComplexToRealMethod (const Display::ComplexToRealMethod method)
void setCoordinateSystem (const CoordinateSystem &csys)
 Set and retrieve the CoordinateSystem of this WorldCanvas.
const CoordinateSystem & coordinateSystem () const
Bool hasCS () const
Bool inDrawArea (Int x, Int y)
 Convenience functions returning whether a pixel coordinate is within bounds of the WC's inner draw area, the WC, or the underlying PC.
Bool inWC (Int x, Int y)
Bool inPC (Int x, Int y)

Private Member Functions

void ctorInit ()
 Support for construction.
void callRefreshEventHandlers (const WCRefreshEvent &ev)
 Call all registered refresh handlers (public method is refresh()).
Bool castingClippingConversion (Vector< Int > &pixelx, Vector< Int > &pixely, Vector< Bool > &validConversions, const Vector< Float > &worldx, const Vector< Float > &worldy, const Bool linear)
 Convert the given coordinate/s to pixel coordinates.
void drawVectorMap (const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Float > &amp, const Matrix< Float > &pa, const Matrix< Bool > &mask, Float angleConversionFactor, Float phasePolarity, Bool debias, Float variance, Int xPixelInc, Int yPixelInc, Float scale, Bool arrow, Float barb, Float rotation, Double xWorldInc, Double yWorldInc, const Bool usePixelEdges)
 Actually draw the vector field.
void trimAndResampleImage (Vector< Double > &drawBlc, Vector< Double > &drawTrc, Matrix< Float > &sampledImage, const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Float > &data, const Bool &usePixelEdges=False)
 Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.
void trimAndResampleImage (Vector< Double > &drawBlc, Vector< Double > &drawTrc, Matrix< Float > &sampledImage, Matrix< Bool > &resampledMask, const Vector< Double > &blc, const Vector< Double > &trc, const Matrix< Float > &data, const Matrix< Bool > &mask, const Bool &usePixelEdges=False)
 Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.
Bool mapToColorAndDrawPoints (const Matrix< Double > &points, const Vector< uInt > &scaledValues, const Bool &linear=False)
 Draw a set of points where scaledValues gives the Colormap index of each point.
Bool mapToColorAndDrawEllipses (const Matrix< Double > &centres, const Vector< Float > &smajor, const Vector< Float > &sminor, const Vector< Float > &pangle, const Vector< uInt > scaledValues, const Float &scale, const Bool &outline, const Bool &linear)
 Draw a set of ellipses where scaledValues gives the Colormap index of each point.
ColorIndexedImage_getClearedColorIndexedImage (void *drawObj=0)
 Retrieve an indexed image to write onto.
void updateCanvasSizesOffsets ()
 Update canvas sizes/offsets from the fracOffsets, and vice versa.
void updateFracSizesOffsets ()
Bool castingConversion (Vector< Int > &pixelpt, const Vector< Double > &worldpt, const Bool &linear)
 Convert the given coordinate/s to pixel coordinates.
Bool castingConversion (Matrix< Int > &pixelpts, const Matrix< Double > &worldpts, const Bool &linear)
Bool castingConversion (Matrix< Float > &pixelpts, const Matrix< Double > &worldpts, const Bool &linear)
void mapToColorAndDrawImage (const Vector< Int > &blc, const Matrix< uInt > &scaledImage)
 Draw an image where scaledImage gives the Colormap index of each screen (PixelCanvas) pixel.
void mapToColorAndDrawImage (const Vector< Int > &blc, const Matrix< uInt > &scaledImage, const Matrix< Bool > &mask, Bool opaqueMask=False)

Private Attributes

Double itsDataMin
 Dynamic data minimum and maximum for this WorldCanvas.
Double itsDataMax
Display::ComplexToRealMethod itsComplexToRealMethod
 Method to use to convert complex data into real values.
AttributeBuffer attributes
 Buffer for Attributes.
String itsWorldBackgroundColor
 Background/foreground colors.
String itsWorldForegroundColor
PixelCanvasitsPixelCanvas
 PixelCanvas pointer.
WCPGFilteritsPGFilter
 PGPLOT filter.
Int itsHoldCount
 Status of hold/release.
Bool itsRefreshHeld
Display::RefreshReason itsHeldReason
CoordinateSystem * itsCoordinateSystem
 The CoordinateSystem for this WorldCanvas.
Bool itsGrabbing
 This state is set True when the pointer is in this WC and a pointer button is pressed (with no buttons pressed previously).
SimpleOrderedMap< void *,
ColorIndexedImage_ * > 
images_
 Cache of pre-drawn ColorIndexedImage_'s.
uInt itsId
 itsId & itsRef used to ensure thread-safe execution of pgplot
uInt itsRef
 WorldCanvas::refresh is a recursive function.
uInt itsCanvasXOffset
 ***Cached*** blc pixel where this world canvas begins = itsPixelCanvas->width()*frac(X|Y)Offset_.
uInt itsCanvasYOffset
uInt itsCanvasXSize
 ***Cached*** number of pixels in each dimension given to the world canvas = itsPixelCanvas->width()*(frac(X|Y)Size_.
uInt itsCanvasYSize
Double itsFracXOffset
 Fractional position of world canvas on pixel canvas.
Double itsFracYOffset
Double itsFracXSize
Double itsFracYSize
uInt itsCanvasDrawXOffset
 ***Cached*** blc pixel where the world canvas 'draw area' (inside margins, labels) begins, relative to WC blc.
uInt itsCanvasDrawYOffset
uInt itsCanvasDrawXSize
 ***Cached*** number of pixels in each dimension given to the drawable part of the world canvas
uInt itsCanvasDrawYSize
Double itsLinXMin
 Linear Coordinate System ranges.
Double itsLinYMin
Double itsLinXMax
Double itsLinYMax
Double itsLinXMinLimit
 Linear Coordinate System Limits.
Double itsLinYMinLimit
Double itsLinXMaxLimit
Double itsLinYMaxLimit
List< DisplayEH * > itsRefreshEHList
 Event handler lists and convenient iterators.
List< WCPositionEH * > itsPositionEHList
List< WCMotionEH * > itsMotionEHList
ListIter< DisplayEH * > * itsREHListIter
ListIter< WCPositionEH * > * itsPEHListIter
ListIter< WCMotionEH * > * itsMEHListIter
WCSizeControlHandleritsSizeControlHandler
 Other handler lists.
WCCoordinateHandleritsCoordinateHandler
WCResampleHandleritsResampleHandler
WCDataScaleHandleritsDataScaleHandler
Bool itsOwnSizeControlHandler
 Store whether we "own" the various handlers.
Bool itsOwnCoordinateHandler
Bool itsOwnResampleHandler
Bool itsOwnDataScaleHandler

Classes

struct  ColorIndexedImage_
 ColorIndexedImage_ stores the state of a WorldCanvas::drawImage() rendering after the chosen data plane has been resampled to screen (Pixelcanvas) pixels and scaled to indices within a fixed-size Colormap, but prior to mapping to actual colors for display. More...


Constructor & Destructor Documentation

casa::WorldCanvas::WorldCanvas ( PixelCanvas pc,
Double  xOrigin = 0.0,
Double  yOrigin = 0.0,
Double  xSize = 1.0,
Double  ySize = 1.0 
)

Construct a WorldCanvas on the given PixelCanvas, at the given origin (in fractions of the PixelCanvas extent), and having the given size (in the same units).

virtual casa::WorldCanvas::~WorldCanvas (  )  [virtual]

Destructor.


Member Function Documentation

PixelCanvas* casa::WorldCanvas::pixelCanvas (  )  const [inline]

Return a pointer to the PixelCanvas on which this WorldCanvas is installed.

Definition at line 223 of file WorldCanvas.h.

References itsPixelCanvas.

void casa::WorldCanvas::addRefreshEventHandler ( DisplayEH eh  ) 

Add the given refresh, motion and position event handlers to the WorldCanvas.

void casa::WorldCanvas::addMotionEventHandler ( WCMotionEH eh  ) 

void casa::WorldCanvas::addPositionEventHandler ( WCPositionEH eh  ) 

void casa::WorldCanvas::removeRefreshEventHandler ( const DisplayEH eh  ) 

Remove the given refresh, motion and position event handlers from the WorldCanvas.

void casa::WorldCanvas::removeMotionEventHandler ( const WCMotionEH eh  ) 

void casa::WorldCanvas::removePositionEventHandler ( const WCPositionEH eh  ) 

void casa::WorldCanvas::callMotionEventHandlers ( const WCMotionEvent ev  ) 

Call all of the motion and position event handlers that are installed on the WorldCanvas.

void casa::WorldCanvas::callPositionEventHandlers ( const WCPositionEvent ev  ) 

virtual void casa::WorldCanvas::handleEvent ( DisplayEvent ev  )  [virtual]

Handle other, generic types of events.

As with call*Handlers above, WC handles these new events by simply distributing them to event handlers registered on it. However, rather than create any more handler lists in WorldCanvas, generic event handlers (DisplayEHs) piggyback on the RefreshEHList. WorldCanvas is also a DisplayEH, and all DisplayEHs implement handling of these new events by overriding the (null) base class version of this method.

Reimplemented from casa::DisplayEH.

void casa::WorldCanvas::operator() ( const PCRefreshEvent pev  )  [virtual]

Handle implicit refresh, motion and position events occuring on the PixelCanvas on which this WorldCanvas is installed.

These functions translate PixelCanvas events into WorldCanvas events.

Reimplemented from casa::PCRefreshEH.

void casa::WorldCanvas::operator() ( const PCMotionEvent pev  )  [virtual]

Default just prints the event to cout.

Reimplemented from casa::PCMotionEH.

void casa::WorldCanvas::operator() ( const PCPositionEvent pev  )  [virtual]

Default just prints the event to cout.

Reimplemented from casa::PCPositionEH.

void casa::WorldCanvas::refresh ( const Display::RefreshReason reason = Display::UserCommand,
const Bool &  explicitrequest = True 
)

Refresh the WorldCanvas for the given reason.

The refresh is prevented from occuring if the PixelCanvas is not yet mapped to the screen, or if the refreshes have been held with earlier call/s to hold() which has/have not been matched with the same number of calls to release().

Bool casa::WorldCanvas::refreshAllowed (  ) 

Is a refresh currently allowed?

void casa::WorldCanvas::hold (  ) 

Hold and release response to refreshes requested with the refresh() member function.

Multiple calls to hold() can be made, and refreshes will not resume until the same number of calls have been made to release(). Note that these functions do not affect whether internally (implicitly) generated refreshes continue to occur. That is, refresh events due to PixelCanvas resize events, or Colormap changes, for example, will continue to be acted upon.

void casa::WorldCanvas::release (  ) 

void casa::WorldCanvas::setCoordinateHandler ( WCCoordinateHandler ch  ) 

Set Coordinate, SizeControl, Resample and DataScale handlers for the WorldCanvas.

If the given handler is 0, then resort to using the default handler.

void casa::WorldCanvas::setSizeControlHandler ( WCSizeControlHandler sh  ) 

void casa::WorldCanvas::setResampleHandler ( WCResampleHandler rh  ) 

void casa::WorldCanvas::setDataScaleHandler ( WCDataScaleHandler sh  ) 

void casa::WorldCanvas::setWorldCanvasPosition ( Double  fracXOffset,
Double  fracYOffset,
Double  fracXSize,
Double  fracYSize 
)

Set the location of the WorldCanvas on its PixelCanvas.

Bool casa::WorldCanvas::pixToLin ( Vector< Double > &  lin,
const Vector< Double > &  pix 
)

Pixel, linear and world coordinate transformation functions.

For the Vector versions, the coordinate mapping returns False if the transformation failed. For the Matrix versions, failures(i) on input should be set to True if the i'th transformation should not be attempted. On output, failures(i) is True if the transformation was not attempted, or failed. If on input the failures vector has zero length, it will be assumed that no prior failures have occurred.

Bool casa::WorldCanvas::pixToLin ( Matrix< Double > &  lin,
Vector< Bool > &  failures,
const Matrix< Double > &  pix 
)

Bool casa::WorldCanvas::linToPix ( Vector< Double > &  pix,
const Vector< Double > &  lin 
)

Bool casa::WorldCanvas::linToPix ( Matrix< Double > &  pix,
Vector< Bool > &  failures,
const Matrix< Double > &  lin 
)

Bool casa::WorldCanvas::linToWorld ( Vector< Double > &  world,
const Vector< Double > &  lin 
)

Bool casa::WorldCanvas::linToWorld ( Matrix< Double > &  world,
Vector< Bool > &  failures,
const Matrix< Double > &  lin 
)

Bool casa::WorldCanvas::worldToLin ( Vector< Double > &  lin,
const Vector< Double > &  world 
)

Bool casa::WorldCanvas::worldToLin ( Matrix< Double > &  lin,
Vector< Bool > &  failures,
const Matrix< Double > &  world 
)

Bool casa::WorldCanvas::pixToWorld ( Vector< Double > &  world,
const Vector< Double > &  pix 
)

Bool casa::WorldCanvas::pixToWorld ( Matrix< Double > &  world,
Vector< Bool > &  failures,
const Matrix< Double > &  pix 
)

Bool casa::WorldCanvas::worldToPix ( Vector< Double > &  pix,
const Vector< Double > &  world 
)

Bool casa::WorldCanvas::worldToPix ( Matrix< Double > &  pix,
Vector< Bool > &  failures,
const Matrix< Double > &  world 
)

void casa::WorldCanvas::registerColormap ( Colormap cmap,
Float  weight = 1.0 
)

Register/unregister a Colormap on the PixelCanvas.

Registration counts are remembered, so that a particular Colormap is guaranteed to be available as long as that Colormap has been registered more times than it has been unregistered. Requests are forwarded to the PixelCanvas.

void casa::WorldCanvas::registerColormap ( Colormap cmap,
Colormap cmapToReplace 
)

void casa::WorldCanvas::unregisterColormap ( Colormap cmap  ) 

void casa::WorldCanvas::setColormap ( Colormap cmap  ) 

Set and retrieve the current Colormap on the PixelCanvas.

This function must be called prior to using a WorldCanvas (or PixelCanvas) drawing routines which is expected to use a Colormap. Passing an unregistered Colormap to setColormap will result in an exception being thrown. Requests are forwarded to the PixelCanvas.

Colormap* casa::WorldCanvas::colormap (  )  const

uInt casa::WorldCanvas::newList (  ) 

Display list support functions.

A display list is started with a call to newList(), finished with a call to endList(), and drawn with a call to drawList(x), with the argument x being the list number returned by the original call to newList(). Lists can be deleted individually with deleteList(x) or in total with deleteLists(). Requests are forwarded to the PixelCanvas.

void casa::WorldCanvas::endList (  ) 

void casa::WorldCanvas::drawList ( uInt  list  ) 

void casa::WorldCanvas::deleteList ( uInt  list  ) 

void casa::WorldCanvas::deleteLists (  ) 

Bool casa::WorldCanvas::validList ( uInt  list  ) 

void casa::WorldCanvas::setColor ( const String &  color  ) 

Set various graphics attributes.

All of these requests are passed directly to the PixelCanvas, except for setColor, which also installs the requested color for subsequent calls to PgPlot functions.

void casa::WorldCanvas::setClearColor ( const String &  color  ) 

Bool casa::WorldCanvas::setFont ( const String &  fontName  ) 

void casa::WorldCanvas::setForeground ( uLong  color  ) 

void casa::WorldCanvas::setBackground ( uLong  color  ) 

void casa::WorldCanvas::setLineWidth ( Float  width  ) 

void casa::WorldCanvas::setLineStyle ( Display::LineStyle  style  ) 

void casa::WorldCanvas::setCapStyle ( Display::CapStyle  style  ) 

void casa::WorldCanvas::setJoinStyle ( Display::JoinStyle  style  ) 

void casa::WorldCanvas::setFillStyle ( Display::FillStyle  style  ) 

void casa::WorldCanvas::setFillRule ( Display::FillRule  rule  ) 

void casa::WorldCanvas::setArcMode ( Display::ArcMode  mode  ) 

Bool casa::WorldCanvas::setWorldBackgroundColor ( const String  color  ) 

Set/retrieve the background and foreground colors of the WorldCanvas.

These can be different to those for the PixelCanvas. Indeed, they will be used as default colors on the WorldCanvas when necessary.

Bool casa::WorldCanvas::setWorldForegroundColor ( const String  color  ) 

String casa::WorldCanvas::getWorldBackgroundColor (  )  [inline]

Definition at line 403 of file WorldCanvas.h.

References itsWorldBackgroundColor.

String casa::WorldCanvas::getWorldForegroundColor (  )  [inline]

Definition at line 405 of file WorldCanvas.h.

References itsWorldForegroundColor.

virtual void casa::WorldCanvas::setDrawBuffer ( Display::DrawBuffer  buf  )  [virtual]

Set/retrieve the drawing buffer, the target destination for graphics.

Requests are passed directly to the PixelCanvas.

Display::DrawBuffer casa::WorldCanvas::drawBuffer (  )  const

void casa::WorldCanvas::setImageCacheStrategy ( Display::ImageCacheStrategy  strategy  ) 

Set/retrieve the caching strategy on the PixelCanvas.

Appropriate values are Display::ClientAlways (use client memory to cache images [safer]), Display::ServerAlways (use server memory to cache images [faster]), and Display::ServerMemoryThreshold (use server memory until a threshold is reached [not yet implemented]). Requests are passed to the PixelCanvas.

Display::ImageCacheStrategy casa::WorldCanvas::imageCacheStrategy (  )  const

void casa::WorldCanvas::clear (  ) 

Clear the WorldCanvas, or just the area on the WorldCanvas but outside the drawing area, ie.

the margins that are normally reserved for axis labels and the like.

void casa::WorldCanvas::clearNonDrawArea (  ) 

virtual void casa::WorldCanvas::setDefaultOptions (  )  [virtual]

Install the default options for this DisplayData.

virtual Bool casa::WorldCanvas::setOptions ( const Record &  rec,
Record &  updatedOptions 
) [virtual]

Apply options stored in rec to the DisplayData; return value True means a refresh is needed.

Any fields added to the updatedOptions argument are options which have changed in some way due to the setting of other options - ie. they are context sensitive.

virtual Record casa::WorldCanvas::getOptions (  )  const [virtual]

Retrieve the current and default options and parameter types.

void casa::WorldCanvas::setAttribute ( Attribute at  ) 

Set an Attribute or Attributes on the WorldCanvas.

void casa::WorldCanvas::setAttributes ( AttributeBuffer at  ) 

void casa::WorldCanvas::removeAttribute ( String &  name  ) 

Remove an Attribute.

Pre-defined Attributes of the WorldCanvas cannot be removed (although nothing serious will happen if you try).

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
uInt &  newValue 
) const

User interface to get individual values from the attribute buffer.

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Int &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Float &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Double &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Bool &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
String &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< uInt > &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< Int > &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< Float > &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< Double > &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< Bool > &  newValue 
) const

Bool casa::WorldCanvas::getAttributeValue ( const String &  name,
Vector< String > &  newValue 
) const

Bool casa::WorldCanvas::existsAttribute ( String &  name  )  const

Check if a certain Attribute exists.

AttValue::ValueType casa::WorldCanvas::attributeType ( String &  name  )  const

Get the type of an Attribute.

virtual void casa::WorldCanvas::acquirePGPLOTdevice ( const Bool &  linear = True  )  [virtual]

Position the PGPLOT filter on the WorldCanvas.

If linear is specified False, then the alignment is done by world coordinates, assuming that a linear approximation is valid. void verifyPGFilterAlignment(const Bool &linear = True);

Acquire and release a PGPLOT device for this WorldCanvas. This is necessary since PGPLOT generally only supports 8 currently active devices. So refresh cycles on the WorldCanvas acquire a PGPLOT device at the start, and release it at the end. Cycles are counted so that external user-classes can call these functions if necessary in a nested state. If linear is specified as False, then the PGPLOT device is aligned by world coordinates, under the assumption that a linear approximation is valid, that is, the curvature is small.

virtual void casa::WorldCanvas::releasePGPLOTdevice (  )  [virtual]

virtual Int casa::WorldCanvas::pgid (  )  const [virtual]

Return the PGPLOT device id for external use.

Bool casa::WorldCanvas::drawText ( const Vector< Double > &  point,
const String &  text,
Display::TextAlign  alignment = Display::AlignCenter,
const Bool &  linear = False 
)

Draw unrotated text at the given position.

If the conversion from world to pixel coordinates fails, the text is not drawn, and False is returned. If linear is True, then the provided position is actually in linear world canvas coordinates, rather than true world coordinates.

Bool casa::WorldCanvas::drawPoint ( const Vector< Double > &  point,
const Bool &  linear = False 
)

Draw a single point using the current color.

If the conversion from world to pixel coordinates fails, the point is not drawn, and False is the return value. If linear is True, then the point position is given in linear world canvas coordinates, not true world coordinates.

Bool casa::WorldCanvas::drawLine ( const Vector< Double > &  a,
const Vector< Double > &  b,
const Bool &  linear = False 
)

Draw a single line using the current color.

If either of the conversions from world to pixel coordinates fail, then the line is not drawn, and False is returned. If linear is True, then the line endpoints are given in world canvas linear coordinates rather than real world coordinates.

Bool casa::WorldCanvas::drawPoints ( const Matrix< Double > &  points,
const Bool &  linear = False 
)

Draw a bunch of points using the current color.

If any points fail to convert then none of them are drawn, and False is returned. If linear is True, then the vertices are given in linear world canvas coordinates rather than real world coordinates.

Bool casa::WorldCanvas::drawPoints ( const Vector< Float > &  px,
const Vector< Float > &  py,
Bool  linear = False 
)

Draw a set of points using the current color.

Those points which fail to convert, or lie outside the WorldCanvas drawing area, are not drawn.

Bool casa::WorldCanvas::drawTextStrings ( const Vector< Float > &  px,
const Vector< Float > &  py,
const Vector< String > &  strings,
const Float  rotation = 0.0,
const Float  xoffset = 0.0,
const Float  yoffset = 0.0,
const Bool  linear = False 
)

Draw a set of text strings using the current color.

If any points fail to convert, then those particular strings are not drawn. rotation gives the rotation of the text in degrees counter-clockwise from horizontal. xoffset and yoffset can be given to globally shift the labels by the specified amounts (in units of the character height). If linear is True, then the vertices are given in linear world canvas coordinates rather than true world coordinates.

Bool casa::WorldCanvas::drawMarkers ( const Vector< Float > &  px,
const Vector< Float > &  py,
const Display::Marker  = Display::Cross,
const Int  size = 5,
const Bool &  linear = False 
)

Draw a set of markers using the current color and a given pixel size.

If any points fail to convert, then those particular points are not marked. markertype is an Display::Marker. If linear is True, then the points are given in linear world canvas coordinates rather than true world coordinates.

Bool casa::WorldCanvas::drawMappedMarkers ( const Vector< Float > &  px,
const Vector< Float > &  py,
const Vector< Float > &  values,
const Int  sizemin = 1,
const Int  sizemax = 20,
const Display::Marker  = Display::Cross,
const Bool &  linear = False 
)

Bool casa::WorldCanvas::drawLines ( const Matrix< Double > &  vertices,
const Bool &  linear = False 
)

Draw pairs of lines using the current color.

If any points fail to convert then the lines are not drawn and False is returned. If linear is True, then the vertices are given as linear world coordinates rather than true world coordinates.

Bool casa::WorldCanvas::drawPolyline ( const Matrix< Double > &  vertices,
const Bool &  linear = False 
)

Draw a polyline (connected line) between the vertices using the current color.

If any coordinates fail to convert from world to pixel, then the entire polyline is not drawn and False is returned. The end point is not implicitly connected to the starting point. If linear is True, then the provided vertices are actually linear world canvas coordinates.

Bool casa::WorldCanvas::drawPolygon ( const Matrix< Double > &  vertices,
const Bool &  linear = False 
)

Draw a polygon (closed line, or line loop using the points) using the current color.

If any coordinates fail to convert then the polygon is not drawn. The end point is implicitly connected to the start point. If linear is True, then the provided vertices are actually linear world coordinates.

Bool casa::WorldCanvas::drawColormappedPoints ( const Matrix< Double > &  points,
const Vector< Float > &  values,
const Bool &  linear = False 
)

Draw a set of points in colors which are taken from the current Colormap.

Bool casa::WorldCanvas::drawColormappedEllipses ( const Matrix< Double > &  centres,
const Vector< Float > &  smajor,
const Vector< Float > &  sminor,
const Vector< Float > &  pangle,
const Vector< Float > &  colors,
const Float &  scale = 1.0,
const Bool &  outline = True,
const Bool &  linear = False 
)

Draw a set of colored ellipses, possibly with outlines.

The x and y locations must given, along with semi-major and semi-minor axes, and position angle measured in degrees positive from the x axis in a counter-clockwise direction. The size of the ellipses is globally scaled by the scale factor, and if outline is True, then each ellipse will have an outline in the current pen color.

Bool casa::WorldCanvas::drawBeamEllipse ( Float  major,
Float  minor,
Float  pa,
String  majunit = "arcsec",
String  minunit = "arcsec",
String  paunit = "deg",
Float  cx = .1f,
Float  cy = .1f,
Bool  outline = True 
)

This routine is specialized for drawing image restoring-beam ellipses.

Its parameters are defined so as to require as little conversion as possible of restoring beam information as stored in an image header.

It does nothing unless the axes on display map to the two axes of a DirectionCoordinate within the WC CS (WorldCanvas::itsCoordinateSystem). Center location cx,cy is specified as a fraction of WC draw area: (0,0) is blc, (1,1) is trc; they default to (.1, .1).

The unit strings for major,minor are given in in majunit, minunit, and should be valid angular units (they default to "arcsec"). major/minor are the _full_ major and minor axis sizes in terms of relative direction world coordinates.

pa specifies "position angle", in the angular units specified by paunit. pa uses the image header convention "North-to-East"; more precisely, 0 degrees aligns the major axis along increasing DirCoord(1) (commonly Dec), 90 degrees aligns it along increasing DirCoord(0) (commonly RA). (NB: increasing RA commonly means decreasing pixel/Lattice coordinates). In the common case, this means that pa increases counterclockwise from vertical. Note that this is _not_ the pa convention in some other PixelCanvas/WorldCanvas drawEllipse() routines (where pa is always counterclockwise from horizontal).

Also note: this routine attempts to do the right thing in oddball cases such as displaying Dec on the horizontal axis (pa 0 would also be horizontal in that case), distorted ('flexible') aspect ratio (ellipse also distorted appropriately) or all-sky images in which the beam may be displayed in a canvas area where absolute world coordinates do not exist. It should even take care of uneven coordinate 'increments' (non-square image data pixels). (So far, it does _not_ correctly handle non-identity transformation matrices in the DirectionCoordinate (e.g. rotated "North")-- which I think is true in many other places as well.\.. -- for someone's to-do list (not mine, I hope)).

void casa::WorldCanvas::drawContourMap ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Float > &  data,
const Vector< Float > &  levels,
const Bool  usePixelEdges = False 
)

Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.

If usePixelEdges is True, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. Note that the contours are not intrinsically drawn in world coordinates. For complex data, the conversion to real values is done according to the last call to setComplexToRealMethod.

void casa::WorldCanvas::drawContourMap ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Complex > &  data,
const Vector< Float > &  levels,
const Bool  usePixelEdges = False 
)

void casa::WorldCanvas::drawContourMap ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Float > &  data,
const Matrix< Bool > &  mask,
const Vector< Float > &  levels,
const Bool  usePixelEdges = False 
)

Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.

If usePixelEdges is True, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. Note that the contours are not intrinsically drawn in world coordinates. For complex data, the conversion to real values is done according to the last call to setComplexToRealMethod. These functions also have a mask argument, which is a Boolean pixel mask whose shape must match that of data, and only pixels in data where corresponding pixels in mask are True will be contoured.

void casa::WorldCanvas::drawContourMap ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Complex > &  data,
const Matrix< Bool > &  mask,
const Vector< Float > &  levels,
const Bool  usePixelEdges = False 
)

Bool casa::WorldCanvas::redrawIndexedImage ( void *  drawObj,
Display::RefreshReason  reason,
Bool  opaqueMask = False 
)

Optimization to speed up colormap fiddling in 24bit mode (software Colormap); see images_, below for usage.

Set opaqueMask to True to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through).

Bool casa::WorldCanvas::removeIndexedImage ( void *  drawObj  ) 

Remove image from the colormap change cache, if any (see images_, below).

Return value indicates whether there was anything to remove.

void casa::WorldCanvas::clearColormapChangeCache (  ) 

Clear the whole colormap change cache (see images_, below).

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Float > &  data,
const Bool  usePixelEdges = False,
void *  drawObj = 0 
)

Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.

If usePixelEdges is True, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. See images_, below, for non-default usage of the drawObj parameter.

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Complex > &  data,
const Bool  usePixelEdges = False,
void *  drawObj = 0 
)

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Float > &  data,
const Matrix< Bool > &  mask,
const Bool  usePixelEdges = False,
void *  drawObj = 0,
Bool  opaqueMask = False 
)

Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.

If usePixelEdges is True, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. These functions also have a mask argument, which is a Boolean pixel mask whose shape must match that of data, and only pixels in data where corresponding pixels in mask are True will be drawn. Set opaqueMask to True to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through). See images_, below, for non-default usage of the drawObj parameter.

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Complex > &  data,
const Matrix< Bool > &  mask,
const Bool  usePixelEdges = False,
void *  drawObj = 0,
Bool  opaqueMask = False 
)

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Float > &  data,
const Display::ColorComponent colorcomponent,
const Bool  usePixelEdges = False 
)

Draw a component of a multi-channel image, mapping data values to component levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.

If usePixelEdges is True, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. The components are not drawn until flushComponentImages() is called.

void casa::WorldCanvas::drawImage ( const Vector< Double > &  blPos,
const Vector< Double > &  trPos,
const Matrix< Complex > &  data,
const Display::ColorComponent colorcomponent,
const Bool  usePixelEdges = False 
)

void casa::WorldCanvas::drawVectorMap ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Complex > &  data,
const Matrix< Bool > &  mask,
Float  angleConversionFactor,
Float  phasePolarity,
Bool  debias,
Float  variance,
Int  xPixelInc,
Int  yPixelInc,
Float  scale,
Bool  arrow,
Float  barb,
Float  rotation,
Double  xWorldInc,
Double  yWorldInc,
const Bool  usePixelEdges 
)

Draw a vector map.

void casa::WorldCanvas::drawVectorMap ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Float > &  data,
const Matrix< Bool > &  mask,
Float  angleConversionFactor,
Float  phasePolarity,
Bool  debias,
Float  variance,
Int  xPixelInc,
Int  yPixelInc,
Float  scale,
Bool  arrow,
Float  barb,
Float  rotation,
Double  xWorldInc,
Double  yWorldInc,
const Bool  usePixelEdges 
)

void casa::WorldCanvas::drawMarkerMap ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Float > &  data,
const Matrix< Bool > &  mask,
Int  xPixelInc,
Int  yPixelInc,
Float  scale,
Double  xWorldInc,
Double  yWorldInc,
const String &  markeType,
Bool  usePixelEdges 
)

Draw marker maps.

Only makerType "square" available presently. The marker holds its shape in screen pixel coordinates. This means a square is always a square regardless of aspect ratio

void casa::WorldCanvas::drawMarkerMap ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Complex > &  data,
const Matrix< Bool > &  mask,
Int  xPixelInc,
Int  yPixelInc,
Float  scale,
Double  xWorldInc,
Double  yWorldInc,
const String &  markerType,
Bool  usePixelEdges 
)

void casa::WorldCanvas::flushComponentImages (  ) 

Flush the component images, ie.

compose a single image from the buffered channel images and place it on the WorldCanvas. This effectively is passed on to the PixelCanvas where the component images are cached.

void casa::WorldCanvas::copyBackBufferToFrontBuffer (  ) 

Buffer memory exchanges which operate only on the area of the WorldCanvas.

(Not cacheable yet.)

void casa::WorldCanvas::copyFrontBufferToBackBuffer (  ) 

void casa::WorldCanvas::swapBuffers (  ) 

Double casa::WorldCanvas::linXMin (  )  const [inline]

Provide information on the extents of the linear coordinate system.

Definition at line 853 of file WorldCanvas.h.

References itsLinXMin.

Double casa::WorldCanvas::linYMin (  )  const [inline]

Definition at line 855 of file WorldCanvas.h.

References itsLinYMin.

Double casa::WorldCanvas::linXMax (  )  const [inline]

Definition at line 857 of file WorldCanvas.h.

References itsLinXMax.

Double casa::WorldCanvas::linYMax (  )  const [inline]

Definition at line 859 of file WorldCanvas.h.

References itsLinYMax.

Double casa::WorldCanvas::linXMinLimit (  )  const [inline]

Provide information on the limits of the linear coordinate system.

Definition at line 866 of file WorldCanvas.h.

References itsLinXMinLimit.

Double casa::WorldCanvas::linYMinLimit (  )  const [inline]

Definition at line 868 of file WorldCanvas.h.

References itsLinYMinLimit.

Double casa::WorldCanvas::linXMaxLimit (  )  const [inline]

Definition at line 870 of file WorldCanvas.h.

References itsLinXMaxLimit.

Double casa::WorldCanvas::linYMaxLimit (  )  const [inline]

Definition at line 872 of file WorldCanvas.h.

References itsLinYMaxLimit.

uInt casa::WorldCanvas::canvasXOffset (  )  const [inline]

Provide information on the WorldCanvas offset and size.

Definition at line 878 of file WorldCanvas.h.

References itsCanvasXOffset.

uInt casa::WorldCanvas::canvasYOffset (  )  const [inline]

Definition at line 880 of file WorldCanvas.h.

References itsCanvasYOffset.

uInt casa::WorldCanvas::canvasXSize (  )  const [inline]

Definition at line 882 of file WorldCanvas.h.

References itsCanvasXSize.

uInt casa::WorldCanvas::canvasYSize (  )  const [inline]

Definition at line 884 of file WorldCanvas.h.

References itsCanvasYSize.

uInt casa::WorldCanvas::canvasDrawXOffset (  )  const [inline]

Provide information on the WorldCanvas drawable offset and size.

Definition at line 890 of file WorldCanvas.h.

References itsCanvasDrawXOffset.

uInt casa::WorldCanvas::canvasDrawYOffset (  )  const [inline]

Definition at line 892 of file WorldCanvas.h.

References itsCanvasDrawYOffset.

uInt casa::WorldCanvas::canvasDrawXSize (  )  const [inline]

Definition at line 894 of file WorldCanvas.h.

References itsCanvasDrawXSize.

uInt casa::WorldCanvas::canvasDrawYSize (  )  const [inline]

Definition at line 896 of file WorldCanvas.h.

References itsCanvasDrawYSize.

void casa::WorldCanvas::setZoomRectangleLCS ( const Vector< Double > &  min,
const Vector< Double > &  max 
)

Set the zoom rectangle to the specfied linear coordinate range.

void casa::WorldCanvas::moveZoomRectangleLCS ( double  dx,
double  dy 
)

Move the zoom rectangle across the screen, ie.

pan.

void casa::WorldCanvas::resetZoomRectangle (  ) 

Reset the zoom to show the entire allowable range of the linear coordinate system.

void casa::WorldCanvas::setLinearCoordinateSystem ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
Bool  resetZoom = True 
)

Set the allowable range of the linear coordinate system.

Double casa::WorldCanvas::dataMin (  )  const [inline]

Functions to set and retrieve the minimum and maximum data values for scaling data that is drawn on the WorldCanvas.

These values are forwarded to the scale handler, when, for example, images are drawn.

Definition at line 921 of file WorldCanvas.h.

References itsDataMin.

void casa::WorldCanvas::setDataMin ( Double  min  )  [inline]

Definition at line 923 of file WorldCanvas.h.

References itsDataMin.

Double casa::WorldCanvas::dataMax (  )  const [inline]

Definition at line 925 of file WorldCanvas.h.

References itsDataMax.

void casa::WorldCanvas::setDataMax ( Double  max  )  [inline]

Definition at line 927 of file WorldCanvas.h.

References itsDataMax.

void casa::WorldCanvas::setDataMinMax ( Double  min,
Double  max 
) [inline]

Definition at line 929 of file WorldCanvas.h.

References itsDataMax, and itsDataMin.

Display::ComplexToRealMethod casa::WorldCanvas::complexToRealMethod (  )  const [inline]

ComplexToRealMethod defines which real component of a Complex image to extract when it is necessary to convert Complex data into real data.

Definition at line 937 of file WorldCanvas.h.

References itsComplexToRealMethod.

void casa::WorldCanvas::setComplexToRealMethod ( const Display::ComplexToRealMethod  method  )  [inline]

Definition at line 939 of file WorldCanvas.h.

References itsComplexToRealMethod.

void casa::WorldCanvas::setCoordinateSystem ( const CoordinateSystem &  csys  ) 

Set and retrieve the CoordinateSystem of this WorldCanvas.

Set with 0 and the WorldCanvas loses its CoordinateSystem!

const CoordinateSystem& casa::WorldCanvas::coordinateSystem (  )  const

Referenced by casa::RSUtils::hasDirectionCoordinate(), and casa::RSUtils::worldSystem().

Bool casa::WorldCanvas::hasCS (  )  const [inline]

Definition at line 953 of file WorldCanvas.h.

References itsCoordinateSystem.

Bool casa::WorldCanvas::inDrawArea ( Int  x,
Int  y 
) [inline]

Convenience functions returning whether a pixel coordinate is within bounds of the WC's inner draw area, the WC, or the underlying PC.

Definition at line 960 of file WorldCanvas.h.

References itsCanvasDrawXOffset, itsCanvasDrawXSize, itsCanvasDrawYOffset, itsCanvasDrawYSize, itsCanvasXOffset, and itsCanvasYOffset.

Bool casa::WorldCanvas::inWC ( Int  x,
Int  y 
) [inline]

Definition at line 967 of file WorldCanvas.h.

References itsCanvasXOffset, itsCanvasXSize, itsCanvasYOffset, and itsCanvasYSize.

Bool casa::WorldCanvas::inPC ( Int  x,
Int  y 
)

void casa::WorldCanvas::ctorInit (  )  [private]

Support for construction.

void casa::WorldCanvas::callRefreshEventHandlers ( const WCRefreshEvent ev  )  [private]

Call all registered refresh handlers (public method is refresh()).

void casa::WorldCanvas::updateCanvasSizesOffsets (  )  [private]

Update canvas sizes/offsets from the fracOffsets, and vice versa.

void casa::WorldCanvas::updateFracSizesOffsets (  )  [private]

Bool casa::WorldCanvas::castingConversion ( Vector< Int > &  pixelpt,
const Vector< Double > &  worldpt,
const Bool &  linear 
) [private]

Convert the given coordinate/s to pixel coordinates.

If linear is True, then the given coordinates are in linear world coordinates, otherwise they are real world coordinates. A return value of False indicates the conversion failed.

Bool casa::WorldCanvas::castingConversion ( Matrix< Int > &  pixelpts,
const Matrix< Double > &  worldpts,
const Bool &  linear 
) [private]

Bool casa::WorldCanvas::castingConversion ( Matrix< Float > &  pixelpts,
const Matrix< Double > &  worldpts,
const Bool &  linear 
) [private]

Bool casa::WorldCanvas::castingClippingConversion ( Vector< Int > &  pixelx,
Vector< Int > &  pixely,
Vector< Bool > &  validConversions,
const Vector< Float > &  worldx,
const Vector< Float > &  worldy,
const Bool  linear 
) [private]

Convert the given coordinate/s to pixel coordinates.

If linear is True, then the input coordinates are linear world coordinates, otherwise they are true world coordinates. This version applies clipping, so that any points in the series which lie outside the linear coordinate range of the WorldCanvas are discarded. Thus the output Vectors can be shorter than the input Vectors. A mask indicating which of the input points were valid is returned for user reference.

void casa::WorldCanvas::drawVectorMap ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Float > &  amp,
const Matrix< Float > &  pa,
const Matrix< Bool > &  mask,
Float  angleConversionFactor,
Float  phasePolarity,
Bool  debias,
Float  variance,
Int  xPixelInc,
Int  yPixelInc,
Float  scale,
Bool  arrow,
Float  barb,
Float  rotation,
Double  xWorldInc,
Double  yWorldInc,
const Bool  usePixelEdges 
) [private]

Actually draw the vector field.

All pa * angleConversionFactor must be radians. rotation must be radians. if amp is of dimension 0, amplitude unity is assumed. if mask if dimension 0 all data are assumed good.

void casa::WorldCanvas::trimAndResampleImage ( Vector< Double > &  drawBlc,
Vector< Double > &  drawTrc,
Matrix< Float > &  sampledImage,
const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Float > &  data,
const Bool &  usePixelEdges = False 
) [private]

Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.

void casa::WorldCanvas::trimAndResampleImage ( Vector< Double > &  drawBlc,
Vector< Double > &  drawTrc,
Matrix< Float > &  sampledImage,
Matrix< Bool > &  resampledMask,
const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Matrix< Float > &  data,
const Matrix< Bool > &  mask,
const Bool &  usePixelEdges = False 
) [private]

Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.

This function takes a mask indicating which pixels should be drawn. This function therefore also trims and resamples the mask.

void casa::WorldCanvas::mapToColorAndDrawImage ( const Vector< Int > &  blc,
const Matrix< uInt > &  scaledImage 
) [private]

Draw an image where scaledImage gives the Colormap index of each screen (PixelCanvas) pixel.

'blc' contains X and Y PixelCanvas coordinates. Masked version as well. For masked version, set opaqueMask to True to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through).

void casa::WorldCanvas::mapToColorAndDrawImage ( const Vector< Int > &  blc,
const Matrix< uInt > &  scaledImage,
const Matrix< Bool > &  mask,
Bool  opaqueMask = False 
) [private]

Bool casa::WorldCanvas::mapToColorAndDrawPoints ( const Matrix< Double > &  points,
const Vector< uInt > &  scaledValues,
const Bool &  linear = False 
) [private]

Draw a set of points where scaledValues gives the Colormap index of each point.

Point coordinates ('points') are either linear or world coordinates, as specified by 'linear'.

Bool casa::WorldCanvas::mapToColorAndDrawEllipses ( const Matrix< Double > &  centres,
const Vector< Float > &  smajor,
const Vector< Float > &  sminor,
const Vector< Float > &  pangle,
const Vector< uInt >  scaledValues,
const Float &  scale,
const Bool &  outline,
const Bool &  linear 
) [private]

Draw a set of ellipses where scaledValues gives the Colormap index of each point.

Point coordinates ('points') are either linear or world coordinates, as specified by 'linear'.

ColorIndexedImage_* casa::WorldCanvas::getClearedColorIndexedImage ( void *  drawObj = 0  )  [private]

Retrieve an indexed image to write onto.

Used (exclusively) by WC::drawImage(). If one exists in the cache under this objId key, clear it for reuse; otherwise return a new one. If a (non-zero) objId was provided, it will be cached under that key; removeIndexedImage() can be used to remove such cached images explicitly, but the cache is also frequently cleared automatically. If no caching is requested, however, (objId=0), the caller must delete the image himself when finished -- that type of call is equivalent to 'new ColorIndexedImage_'.


Member Data Documentation

uInt casa::WorldCanvas::itsCanvasXOffset [private]

***Cached*** blc pixel where this world canvas begins = itsPixelCanvas->width()*frac(X|Y)Offset_.

Definition at line 1099 of file WorldCanvas.h.

Referenced by canvasXOffset(), inDrawArea(), and inWC().

uInt casa::WorldCanvas::itsCanvasYOffset [private]

Definition at line 1100 of file WorldCanvas.h.

Referenced by canvasYOffset(), inDrawArea(), and inWC().

uInt casa::WorldCanvas::itsCanvasXSize [private]

***Cached*** number of pixels in each dimension given to the world canvas = itsPixelCanvas->width()*(frac(X|Y)Size_.

Definition at line 1106 of file WorldCanvas.h.

Referenced by canvasXSize(), and inWC().

uInt casa::WorldCanvas::itsCanvasYSize [private]

Definition at line 1107 of file WorldCanvas.h.

Referenced by canvasYSize(), and inWC().

Double casa::WorldCanvas::itsFracXOffset [private]

Fractional position of world canvas on pixel canvas.

The offset values are always in the range of [0.0,1.0], and sizes must be smaller or equal to (1.0 - offset) for each dimension.

Definition at line 1114 of file WorldCanvas.h.

Double casa::WorldCanvas::itsFracYOffset [private]

Definition at line 1115 of file WorldCanvas.h.

Double casa::WorldCanvas::itsFracXSize [private]

Definition at line 1116 of file WorldCanvas.h.

Double casa::WorldCanvas::itsFracYSize [private]

Definition at line 1117 of file WorldCanvas.h.

uInt casa::WorldCanvas::itsCanvasDrawXOffset [private]

***Cached*** blc pixel where the world canvas 'draw area' (inside margins, labels) begins, relative to WC blc.

Definition at line 1123 of file WorldCanvas.h.

Referenced by canvasDrawXOffset(), and inDrawArea().

uInt casa::WorldCanvas::itsCanvasDrawYOffset [private]

Definition at line 1124 of file WorldCanvas.h.

Referenced by canvasDrawYOffset(), and inDrawArea().

uInt casa::WorldCanvas::itsCanvasDrawXSize [private]

***Cached*** number of pixels in each dimension given to the drawable part of the world canvas

Definition at line 1130 of file WorldCanvas.h.

Referenced by canvasDrawXSize(), and inDrawArea().

uInt casa::WorldCanvas::itsCanvasDrawYSize [private]

Definition at line 1131 of file WorldCanvas.h.

Referenced by canvasDrawYSize(), and inDrawArea().

Double casa::WorldCanvas::itsLinXMin [private]

Linear Coordinate System ranges.

Definition at line 1136 of file WorldCanvas.h.

Referenced by linXMin().

Double casa::WorldCanvas::itsLinYMin [private]

Definition at line 1137 of file WorldCanvas.h.

Referenced by linYMin().

Double casa::WorldCanvas::itsLinXMax [private]

Definition at line 1138 of file WorldCanvas.h.

Referenced by linXMax().

Double casa::WorldCanvas::itsLinYMax [private]

Definition at line 1139 of file WorldCanvas.h.

Referenced by linYMax().

Double casa::WorldCanvas::itsLinXMinLimit [private]

Linear Coordinate System Limits.

Definition at line 1144 of file WorldCanvas.h.

Referenced by linXMinLimit().

Double casa::WorldCanvas::itsLinYMinLimit [private]

Definition at line 1145 of file WorldCanvas.h.

Referenced by linYMinLimit().

Double casa::WorldCanvas::itsLinXMaxLimit [private]

Definition at line 1146 of file WorldCanvas.h.

Referenced by linXMaxLimit().

Double casa::WorldCanvas::itsLinYMaxLimit [private]

Definition at line 1147 of file WorldCanvas.h.

Referenced by linYMaxLimit().

Double casa::WorldCanvas::itsDataMin [private]

Dynamic data minimum and maximum for this WorldCanvas.

Definition at line 1151 of file WorldCanvas.h.

Referenced by dataMin(), setDataMin(), and setDataMinMax().

Double casa::WorldCanvas::itsDataMax [private]

Definition at line 1151 of file WorldCanvas.h.

Referenced by dataMax(), setDataMax(), and setDataMinMax().

Display::ComplexToRealMethod casa::WorldCanvas::itsComplexToRealMethod [private]

Method to use to convert complex data into real values.

Definition at line 1154 of file WorldCanvas.h.

Referenced by complexToRealMethod(), and setComplexToRealMethod().

List<DisplayEH *> casa::WorldCanvas::itsRefreshEHList [private]

Event handler lists and convenient iterators.

Definition at line 1158 of file WorldCanvas.h.

List<WCPositionEH *> casa::WorldCanvas::itsPositionEHList [private]

Definition at line 1159 of file WorldCanvas.h.

List<WCMotionEH *> casa::WorldCanvas::itsMotionEHList [private]

Definition at line 1160 of file WorldCanvas.h.

ListIter<DisplayEH *>* casa::WorldCanvas::itsREHListIter [mutable, private]

Definition at line 1161 of file WorldCanvas.h.

ListIter<WCPositionEH *>* casa::WorldCanvas::itsPEHListIter [mutable, private]

Definition at line 1162 of file WorldCanvas.h.

ListIter<WCMotionEH *>* casa::WorldCanvas::itsMEHListIter [mutable, private]

Definition at line 1163 of file WorldCanvas.h.

WCSizeControlHandler* casa::WorldCanvas::itsSizeControlHandler [private]

Other handler lists.

Definition at line 1168 of file WorldCanvas.h.

WCCoordinateHandler* casa::WorldCanvas::itsCoordinateHandler [private]

Definition at line 1169 of file WorldCanvas.h.

WCResampleHandler* casa::WorldCanvas::itsResampleHandler [private]

Definition at line 1170 of file WorldCanvas.h.

WCDataScaleHandler* casa::WorldCanvas::itsDataScaleHandler [private]

Definition at line 1171 of file WorldCanvas.h.

Bool casa::WorldCanvas::itsOwnSizeControlHandler [private]

Store whether we "own" the various handlers.

Definition at line 1176 of file WorldCanvas.h.

Bool casa::WorldCanvas::itsOwnCoordinateHandler [private]

Definition at line 1177 of file WorldCanvas.h.

Bool casa::WorldCanvas::itsOwnResampleHandler [private]

Definition at line 1178 of file WorldCanvas.h.

Bool casa::WorldCanvas::itsOwnDataScaleHandler [private]

Definition at line 1179 of file WorldCanvas.h.

AttributeBuffer casa::WorldCanvas::attributes [private]

Buffer for Attributes.

Definition at line 1183 of file WorldCanvas.h.

String casa::WorldCanvas::itsWorldBackgroundColor [private]

Background/foreground colors.

Definition at line 1186 of file WorldCanvas.h.

Referenced by getWorldBackgroundColor().

String casa::WorldCanvas::itsWorldForegroundColor [private]

Definition at line 1187 of file WorldCanvas.h.

Referenced by getWorldForegroundColor().

PixelCanvas* casa::WorldCanvas::itsPixelCanvas [private]

PixelCanvas pointer.

Definition at line 1190 of file WorldCanvas.h.

Referenced by pixelCanvas().

WCPGFilter* casa::WorldCanvas::itsPGFilter [private]

PGPLOT filter.

Definition at line 1193 of file WorldCanvas.h.

Int casa::WorldCanvas::itsHoldCount [private]

Status of hold/release.

Definition at line 1196 of file WorldCanvas.h.

Bool casa::WorldCanvas::itsRefreshHeld [private]

Definition at line 1197 of file WorldCanvas.h.

Display::RefreshReason casa::WorldCanvas::itsHeldReason [private]

Definition at line 1198 of file WorldCanvas.h.

CoordinateSystem* casa::WorldCanvas::itsCoordinateSystem [private]

The CoordinateSystem for this WorldCanvas.

New addition, only supported and used by "new" classes.

Definition at line 1202 of file WorldCanvas.h.

Referenced by hasCS().

Bool casa::WorldCanvas::itsGrabbing [private]

This state is set True when the pointer is in this WC and a pointer button is pressed (with no buttons pressed previously).

When True, all PC motion and pointer button events are propagated to this WC's handlers (only), regardless of whether the pointer has moved off the WC. It is reset to False when all buttons are released. This simulates the 'automatic grab' (implemented in X for whole windows), on the WC level.

Definition at line 1211 of file WorldCanvas.h.

SimpleOrderedMap<void*, ColorIndexedImage_*> casa::WorldCanvas::images_ [private]

Cache of pre-drawn ColorIndexedImage_'s.

When a caller of drawImage() wants to save one, it passes a drawing-object pointer in the 'drawObj' parameter for use as a retrieval key. It should provide the same key to redrawIndexedImage() in order to reuse the image.

Definition at line 1250 of file WorldCanvas.h.

uInt casa::WorldCanvas::itsId [private]

itsId & itsRef used to ensure thread-safe execution of pgplot

Definition at line 1266 of file WorldCanvas.h.

uInt casa::WorldCanvas::itsRef [private]

WorldCanvas::refresh is a recursive function.

itsRef is used to determine when the recursion is over. i.e, when the initial refresh call is exiting

Definition at line 1271 of file WorldCanvas.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 27 21:36:20 2009 for NRAOCASA by  doxygen 1.5.1