casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
casa::GLPixelCanvas Class Reference

OpenGL implementation of PixelCanvas. More...

#include <GLPixelCanvas.h>

Inheritance diagram for casa::GLPixelCanvas:
casa::PixelCanvas

Classes

class  GLPCColorValue
 Holds both a color index and RGBA values. More...
 

Public Member Functions

 GLPixelCanvas (Widget parent, GLPixelCanvasColorTable *glpcctbl, casacore::uInt width, casacore::uInt height)
 
Caution: Drawing can not take place until the window exists!
More...
 
virtual ~GLPixelCanvas ()
 
virtual void enableMotionEvents ()
 enabling/disabling of event tracking (unimplemented) More...
 
virtual void disableMotionEvents ()
 
virtual void enablePositionEvents ()
 
virtual void disablePositionEvents ()
 
virtual casacore::Bool supportsLists ()
 Does this canvas support cached display lists? The user of the canvas should always check this, because undefined behaviour can result when an attempt is made to use a list on a PixelCanvas which does not support lists. More...
 
virtual casacore::uInt newList ()
 begin caching display commands - return list ID More...
 
virtual void endList ()
 end caching display commands More...
 
virtual void drawList (casacore::uInt list)
 (Cacheable) recall cached display commands More...
 
virtual void translateAllLists (casacore::Int xt, casacore::Int yt)
 translate all lists More...
 
virtual void translateList (casacore::uInt list, casacore::Int xt, casacore::Int yt)
 translate the list More...
 
virtual void deleteList (casacore::uInt list)
 remove list from cache More...
 
virtual void deleteLists ()
 flush all lists from the cache More...
 
virtual casacore::Bool validList (casacore::uInt list)
 return true if the list exists More...
 
virtual casacore::Bool setFont (const casacore::String &fontName)
 (Cacheable) Set the font to the recognizable font name. More...
 
virtual void drawText (casacore::Int x, casacore::Int y, const casacore::String &text, Display::TextAlign alignment=Display::AlignCenter)
 (Cacheable) Draw text using that font aligned in some way to the position. More...
 
virtual void drawImage (const casacore::Matrix< casacore::uInt > &data, casacore::Int x, casacore::Int y)
 (Cacheable) Draw an array of 2D color data as a raster image for zoom = <1,1> More...
 
virtual void drawImage (const casacore::Matrix< casacore::Int > &data, casacore::Int x, casacore::Int y)
 
virtual void drawImage (const casacore::Matrix< casacore::uLong > &data, casacore::Int x, casacore::Int y)
 
virtual void drawImage (const casacore::Matrix< casacore::Float > &data, casacore::Int x, casacore::Int y)
 
virtual void drawImage (const casacore::Matrix< casacore::Double > &data, casacore::Int x, casacore::Int y)
 
void GLPixelCanvas::drawIndexedImage (const casacore::Matrix< casacore::uInt > &data, casacore::Float x=0.0, casacore::Float y=0.0, casacore::Float z=0.0, casacore::Float xscl=1.0, casacore::Float yscl=1.0)
 (Cacheable) Draw an image using color indexes. More...
 
virtual void drawImage (const casacore::Int &x, const casacore::Int &y, const casacore::Matrix< casacore::uInt > &data, const casacore::Matrix< casacore::Bool > &mask, casacore::Bool opaqueMask=false)
 (Cacheable) Draw an array of 2D color data as a raster image, taking note of the casacore::Bool mask. More...
 
virtual void drawImage (const casacore::Matrix< casacore::uInt > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)
 (Cacheable) Draw an array of 2D color data as a raster image for any positive integer zoom More...
 
virtual void drawImage (const casacore::Matrix< casacore::Int > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)
 
virtual void drawImage (const casacore::Matrix< casacore::uLong > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)
 
virtual void drawImage (const casacore::Matrix< casacore::Float > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)
 
virtual void drawImage (const casacore::Matrix< casacore::Double > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)
 
virtual void drawImage (const casacore::Matrix< casacore::uInt > &data, const casacore::Int &x, const casacore::Int &y, const Display::ColorComponent &colorcomponent)
 (Cacheable) Draw a component of a multi-channel image, storing it in buffers until flushComponentImages() is called. More...
 
virtual void bufferComponent (const casacore::Matrix< casacore::uInt > &data, const casacore::Int &x, const casacore::Int &y, const Display::ColorComponent &colorcomponent)
 Fill one of the channel buffers. More...
 
virtual void flushComponentBuffers ()
 (NOT CACHEABLE!) Flush the component buffers. More...
 
virtual void drawPoint (casacore::Int x1, casacore::Int y1)
 (Cacheable) Draw a single point using current color More...
 
virtual void drawPoint (casacore::Float x1, casacore::Float y1)
 
virtual void drawPoint3D (casacore::Float x1, casacore::Float y1, casacore::Float z1)
 
virtual void drawPoint (casacore::Double x1, casacore::Double y1)
 
virtual void drawPoints (const casacore::Matrix< casacore::Int > &verts)
 (Cacheable) Draw N points specified as a Nx2 matrix More...
 
virtual void drawPoints (const casacore::Matrix< casacore::Float > &verts)
 
void drawPoints3D (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawPoints (const casacore::Matrix< casacore::Double > &verts)
 
virtual void drawPoints (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
 (Cacheable) Draw a bunch of points using current color More...
 
virtual void drawPoints (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)
 
virtual void drawPoints3D (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &z1)
 
virtual void drawPoints (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
void setPointSize (const casacore::uInt pointsize)
 (cacheable) Change the size of the points (in pixels) drawn by drawPoints. More...
 
virtual void drawLine (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 (Cacheable) Draw a single line using current color More...
 
virtual void drawLine (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
 
virtual void drawLine3D (casacore::Float x1, casacore::Float y1, casacore::Float z1, casacore::Float x2, casacore::Float y2, casacore::Float z2)
 
virtual void drawLine (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)
 
virtual void drawLines (const casacore::Matrix< casacore::Int > &verts)
 (Cacheable) Draw N/2 lines from an Nx2 matrix More...
 
virtual void drawLines (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawLines3D (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawLines (const casacore::Matrix< casacore::Double > &verts)
 
virtual void drawLines (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const casacore::Vector< casacore::Int > &x2, const casacore::Vector< casacore::Int > &y2)
 (Cacheable) Draw a bunch of unrelated lines using current color More...
 
virtual void drawLines (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &x2, const casacore::Vector< casacore::Float > &y2)
 
virtual void drawLines (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const casacore::Vector< casacore::Double > &x2, const casacore::Vector< casacore::Double > &y2)
 
virtual void drawPolyline (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
 (Cacheable) Draw a single connected line between the given points. More...
 
virtual void drawPolyline (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)
 
virtual void drawPolyline3D (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &z1)
 
virtual void drawPolyline (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
virtual void drawPolyline (const casacore::Matrix< casacore::Int > &verts)
 (Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices More...
 
virtual void drawPolyline (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawPolyline (const casacore::Matrix< casacore::Double > &verts)
 
virtual void drawPolygon (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
 (Cacheable) Draw a closed polygon More...
 
virtual void drawPolygon (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)
 
virtual void drawPolygon3D (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &z1)
 
virtual void drawPolygon (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
virtual void drawFilledPolygon (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
 (Cacheable) Draw and fill a closed polygon More...
 
virtual void drawFilledPolygon (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)
 
virtual void drawFilledPolygon3D (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &z1)
 
virtual void drawFilledPolygon (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
virtual void drawPolygon (const casacore::Matrix< casacore::Int > &verts)
 (Cacheable) Draw a closed N-sided polygon from Nx2 matrix of vertices More...
 
virtual void drawPolygon (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawPolygon3D (const casacore::Matrix< casacore::Float > &verts)
 
virtual void drawPolygon (const casacore::Matrix< casacore::Double > &verts)
 
virtual void drawRectangle (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 (Cacheable) Draw a rectangle More...
 
virtual void drawRectangle (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
 
virtual void drawRectangle (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)
 
virtual void drawFilledRectangle (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 (Cacheable) Draw a filled rectangle More...
 
virtual void drawFilledRectangle (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
 
virtual void drawFilledRectangle (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)
 
virtual void drawColoredPoints (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const casacore::Vector< casacore::uInt > &colors)
 (Cacheable) Draw a set of points, specifying a color per point to be drawn. More...
 
virtual void drawColoredPoints (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredPoints (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredPoints (const casacore::Matrix< casacore::Int > &xy, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredPoints (const casacore::Matrix< casacore::Float > &xy, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredPoints (const casacore::Matrix< casacore::Double > &xy, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredLines (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const casacore::Vector< casacore::Int > &x2, const casacore::Vector< casacore::Int > &y2, const casacore::Vector< casacore::uInt > &colors)
 (Cacheable) Draw a set of lines, specifying a color per line to be drawn. More...
 
virtual void drawColoredLines (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::Float > &x2, const casacore::Vector< casacore::Float > &y2, const casacore::Vector< casacore::uInt > &colors)
 
virtual void drawColoredLines (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const casacore::Vector< casacore::Double > &x2, const casacore::Vector< casacore::Double > &y2, const casacore::Vector< casacore::uInt > &colors)
 
virtual void setForeground (casacore::uLong color)
 Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums. More...
 
virtual void setLineWidth (casacore::Float width)
 virtual void setLineWidth(casacore::uInt width) = 0; More...
 
virtual void setLineStyle (Display::LineStyle style)
 
virtual void setFillStyle (Display::FillStyle style)
 
virtual void setDrawFunction (Display::DrawFunction function)
 Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums. More...
 
virtual void setBackground (casacore::uLong color)
 Unimplemented set graphics functions. More...
 
virtual void setCapStyle (Display::CapStyle style)
 
virtual void setJoinStyle (Display::JoinStyle style)
 
virtual void setFillRule (Display::FillRule rule)
 
virtual void setArcMode (Display::ArcMode mode)
 
virtual casacore::uLong getForeground () const
 Implemented get Graphics Attributes functions. More...
 
virtual casacore::Float getLineWidth () const
 virtual casacore::uInt getLineWidth() const = 0; More...
 
virtual Display::LineStyle getLineStyle () const
 
virtual Display::FillStyle getFillStyle () const
 
virtual Display::DrawFunction getDrawFunction () const
 Get Graphics Attributes. More...
 
virtual casacore::uLong getBackground () const
 Unimplemented get Graphics Attributes. More...
 
virtual Display::CapStyle getCapStyle () const
 
virtual Display::JoinStyle getJoinStyle () const
 
virtual Display::FillRule getFillRule () const
 
virtual Display::ArcMode getArcMode () const
 
virtual casacore::Bool enable (Display::Option option)
 (Cacheable) Option Control Options listed in DisplayEnums Only Display::ClipWindow is implemented. More...
 
virtual casacore::Bool disable (Display::Option option)
 
virtual void setImageCacheStrategy (Display::ImageCacheStrategy strategy)
 Control the image-caching strategy. More...
 
virtual Display::ImageCacheStrategy imageCacheStrategy () const
 
virtual void setClipWindow (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 (Cacheable) Setup the clip window. More...
 
virtual void getClipWindow (casacore::Int &x1, casacore::Int &y1, casacore::Int &x2, casacore::Int &y2)
 
void redraw ()
 (Not Cacheable) Redraw the window More...
 
virtual void refresh (const Display::RefreshReason &reason=Display::UserCommand, const casacore::Bool &explicitrequest=true)
 
void repaint (const casacore::Bool redraw=false)
 Just redraws window. More...
 
virtual void flush ()
 Cause display to flush any graphics commands not yet drawn. More...
 
virtual void clear ()
 (Cacheable) Clear the window using the background color
Tip: If you want to clear the window use clear(), not clear(IIII);
More...
 
virtual void clear (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 
virtual void setClearColor (casacore::uInt colorIndex)
 (Cacheable) Set the color to use for clearing the display More...
 
virtual void setClearColor (const casacore::String &colorname)
 
Caution: Setting named colors for Index mode isn't implemented;
More...
 
virtual void setClearColor (float r, float g, float b)
 
virtual casacore::uInt clearColor () const
 (Not Cacheable) Get the current color to use for clearing the display. More...
 
virtual void getClearColor (float &r, float &g, float &b) const
 
virtual void setDeviceForegroundColor (const casacore::String colorname)
 Get/set the current foreground/background colors. More...
 
virtual casacore::String deviceForegroundColor () const
 
virtual void setDeviceBackgroundColor (const casacore::String colorname)
 
virtual casacore::String deviceBackgroundColor () const
 
virtual casacore::uInt width () const
 Return the width of the GLPixelCanvas in pixels. More...
 
virtual casacore::uInt height () const
 Return the height of the GLPixelCanvas in pixels. More...
 
virtual casacore::uInt depth () const
 Return the depth of the GLPixelCanvas in bits. More...
 
virtual void pixelDensity (casacore::Float &xdpi, casacore::Float &ydpi) const
 Get the pixel density (in dots per inch [dpi]) of the GLPixelCanvas
Tip: The X server is queried; It may or may not have the correct answer;
More...
 
virtual void setColor (casacore::uInt colorIndex)
 (Cacheable) Set current color (works in RGB or colormap mode) More...
 
virtual void setColor (const casacore::String &colorname)
 
virtual void setRGBColor (float r, float g, float b)
 
Caution: Calling setRGBColor when in Index mode ignores r, g & b and uses the current index value;
More...
 
virtual casacore::Bool getColorComponents (const casacore::String &colorname, casacore::Float &r, casacore::Float &g, casacore::Float &b)
 Get color components in range 0 to 1 without actually allocating the color. More...
 
virtual casacore::uInt color () const
 (Not Cacheable) Returns the current color as a color index
Note: In RGB mode, this is only valid if setColor(index) has been called;
More...
 
virtual void getColor (float &r, float &g, float &b) const
 (Not Cacheable) Retuns the current color as an RGB triple More...
 
virtual casacore::Bool getColor (casacore::Int x, casacore::Int y, casacore::uInt &color)
 (Not Cacheable) Get color index value (works in RGB or colormap mode)
Tip: Don't bother; No existing canvas implements these;
More...
 
virtual casacore::Bool getRGBColor (casacore::Int x, casacore::Int y, float &r, float &g, float &b)
 This should be removed since no one implements it. More...
 
virtual casacore::Bool resize (casacore::uInt reqXSize, casacore::uInt reqYSize, casacore::Bool doCallbacks=true)
 (Not Cacheable) resize request. More...
 
virtual casacore::Bool resizeColorTable (casacore::uInt newSize)
 (Not Cacheable) resize the colortable by requesting a new number of cells More...
 
virtual casacore::Bool resizeColorTable (casacore::uInt nReds, casacore::uInt nGreens, casacore::uInt nBlues)
 (Not Cacheable) resize the colortable by requesting a new RGB/HSV cube More...
 
virtual GLPixelCanvasColorTableglpcctbl () const
 Need a mechanism to return the GLPixelCanvasColorTable so drawing functions within classes can operate. More...
 
PixelCanvasColorTablepcctbl () const
 Return the pixel canvas color table. More...
 
void setPcctbl (PixelCanvasColorTable *pcctbl)
 
virtual void pushMatrix ()
 save/restore the current translation. More...
 
virtual void popMatrix ()
 
virtual void loadIdentity ()
 zero the current translation More...
 
virtual void translate (casacore::Int xt, casacore::Int yt)
 translation functions translate applies a relative translation to the current matrix and can be used to position graphics. More...
 
virtual void getTranslation (casacore::Int &xt, casacore::Int &yt) const
 
Tip: get/x/yTranslation are not currently implemented;
More...
 
virtual casacore::Int xTranslation () const
 
virtual casacore::Int yTranslation () const
 
virtual void setDrawBuffer (Display::DrawBuffer buf)
 (Not cacheable) set the draw buffer
Caution: The draw buffer is always set to BACK if double buffered and FRONT if single buffered;
More...
 
void copyBuffer (GLenum from, GLenum to)
 
virtual void copyBackBufferToFrontBuffer ()
 buffer memory exchanges (Not cacheable) More...
 
virtual void copyFrontBufferToBackBuffer ()
 
virtual void swapBuffers ()
 
virtual void copyBackBufferToFrontBuffer (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 partial buffer memory exchanges. More...
 
virtual void copyFrontBufferToBackBuffer (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 
virtual void swapBuffers (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
 
virtual casacore::Bool refreshAllowed () const
 return true if refresh is allowed right now... More...
 
void makeCurrent ()
 Make this canvas's context current. More...
 
void waitX ()
 Wait for X or GL commands to finish. More...
 
void waitGL ()
 
int glcheck (const char *msg=NULL, casacore::uInt nspaces=0)
 Print any GL error messages. More...
 
void drawTexturedImage (GLfloat x, GLfloat y, GLfloat z, GLsizei width, GLsizei height, GLfloat xscale, GLfloat yscale, GLenum format, const GLushort *pixels, GLPCTextureParams *params=NULL)
 Various ways to draw images. More...
 
void drawImagePixels (GLfloat x, GLfloat y, GLfloat z, GLsizei width, GLsizei height, GLfloat xscale, GLfloat yscale, GLenum format, const GLushort *pixels)
 
void drawGLImage (GLfloat x, GLfloat y, GLfloat z, GLsizei width, GLsizei height, GLfloat xscale, GLfloat yscale, GLenum format, const GLushort *pixels)
 Calls drawImagePixels if in indexed mode or drawTexturedImage if RGB. More...
 
void bufferZValue (const casacore::Float z=0.0)
 
void trace (Boolean trace)
 Tracing support. More...
 
Boolean tracing () const
 
void traceLevel (const casacore::uLong traceLevel)
 Set trace level. More...
 
casacore::uLong traceLevel () const
 
void postToStream (casacore::Bool p=false)
 
void postToString (casacore::String *s=NULL)
 
void postString ()
 
void note (const char *note)
 Add a note entry to traced output. More...
 
Boolean autoRefresh () const
 Normally GLPixelCanvas repaints the window when it is damaged. More...
 
void autoRefresh (Boolean refresh)
 
void pushAttrib (const GLbitfield attrib)
 OpenGL's push/popAttrib functions. More...
 
void popAttrib ()
 
Boolean doubleBuffered () const
 
Boolean isRGB () const
 
- Public Member Functions inherited from casa::PixelCanvas
virtual ~PixelCanvas ()
 
void addRefreshEventHandler (const PCRefreshEH &eh)
 add event handlers More...
 
void addMotionEventHandler (const PCMotionEH &eh)
 
void addPositionEventHandler (const PCPositionEH &eh)
 
void removeRefreshEventHandler (const PCRefreshEH &eh)
 remove event handlers More...
 
void removeMotionEventHandler (const PCMotionEH &eh)
 
void removePositionEventHandler (const PCPositionEH &eh)
 
void callRefreshEventHandlers (Display::RefreshReason reason)
 call event handlers More...
 
void callMotionEventHandlers (casacore::Int x, casacore::Int y, casacore::uInt state)
 
void callPositionEventHandlers (Display::KeySym keysym, casacore::Bool keystate, casacore::Int x, casacore::Int y, casacore::uInt state)
 
virtual casacore::Bool setFont (DLFont *)
 TODO: These should become abstract Set the font via the DisplayLibrary Font class. More...
 
virtual casacore::Bool setFont (const casacore::String &, const casacore::Int)
 Set the font to font name / size. More...
 
virtual void drawText (casacore::Int, casacore::Int, const casacore::String &, const casacore::Float &, Display::TextAlign=Display::AlignCenter)
 TODO This should become abstract - NYI in GLPixelCanvas currently Draw text at a specified angle. More...
 
virtual casacore::Int textWidth (const casacore::String &)
 TODO : This should become abstract Determine the width / height of a string of text based on current settings. More...
 
virtual casacore::Int textHeight (const casacore::String &)
 
virtual void drawMarker (const casacore::Int &x1, const casacore::Int &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 Draw a "marker". More...
 
virtual void drawMarker (const casacore::Float &x1, const casacore::Float &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 
virtual void drawMarker (const casacore::Double &x1, const casacore::Double &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 
virtual void drawEllipse (const casacore::Float &cx, const casacore::Float &cy, const casacore::Float &smajor, const casacore::Float &sminor, const casacore::Float &pangle, casacore::Bool outline=true, casacore::Float xstretch=1., casacore::Float ystretch=1.)
 Draw a single ellipse using the current pen (ie. More...
 
virtual void drawColoredEllipses (const casacore::Matrix< casacore::Float > &centres, const casacore::Vector< casacore::Float > &smajor, const casacore::Vector< casacore::Float > &sminor, const casacore::Vector< casacore::Float > &pangle, const casacore::Vector< casacore::uInt > &colors, const casacore::Float &scale=1.0, const casacore::Bool &outline=true)
 Draw a set of colored ellipses, possibly with borders. More...
 
void bufferPoint (casacore::Float x, casacore::Float y)
 vector primitive buffering More...
 
void bufferLine (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
 
void bufferPolylinePoint (casacore::Float x, casacore::Float y)
 
void bufferPolygonPoint (casacore::Float x, casacore::Float y)
 
void flushBuffer ()
 
void redraw ()
 (Not Cacheable) Redraw the window More...
 
virtual void setHSVColor (float h, float s, float v)
 
virtual casacore::Bool getHSVColor (casacore::Int x, casacore::Int y, float &h, float &s, float &v)
 
void setColormap (Colormap *map)
 (Not Cacheable) set/get the current colormap. More...
 
Colormapcolormap () const
 
casacore::Bool colormapRegistered ()
 
void registerColormap (Colormap *dcmap, casacore::Float weight=1.0)
 register a colormap to the pixelcanvas. More...
 
void registerColormap (Colormap *cmap, Colormap *cmapToReplace)
 Register the cmap Colormap on the PixelCanvas, replacing the cmapToReplace Colormap if possible. More...
 
void unregisterColormap (Colormap *dcmap)
 unregister a colormap from a pixelcanvas. More...
 
casacore::uInt getColormapSize () const
 return the size of the current colormap More...
 
void mapToColor (casacore::Array< casacore::uChar > &outArray, const casacore::Array< casacore::uChar > &inArray, casacore::Bool rangeCheck=false)
 map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigned integers in their respective array. More...
 
void mapToColor (casacore::Array< casacore::uShort > &outArray, const casacore::Array< casacore::uShort > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uLong > &outArray, const casacore::Array< casacore::uLong > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uChar > &inOutArray, casacore::Bool rangeCheck=false)
 same as above except the matrix is operated on in place. More...
 
void mapToColor (casacore::Array< casacore::uShort > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uLong > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArrayRed, const casacore::Array< casacore::uInt > &inArrayGreen, const casacore::Array< casacore::uInt > &inArrayBlue)
 
void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in)
 Multi-Channel functions that combine separate array channels into a single array of output colors for use with functions that take color values. More...
 
void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Double > &chan1in, const casacore::Array< casacore::Double > &chan2in, const casacore::Array< casacore::Double > &chan3in)
 
virtual void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::uInt > &chan1in, const casacore::Array< casacore::uInt > &chan2in, const casacore::Array< casacore::uInt > &chan3in)
 This one maps values between 0 and the integer maximum value for each channel into a single output image suitable for PixelCanvas::drawImage. More...
 
Display::DrawBuffer drawBuffer () const
 return the drawing buffer, the target destination for graphics More...
 
Display::DrawMode drawMode () const
 return the drawmode (Compile or Draw) Compile drawmode means that a display list is currently being built Draw drawmode means that drawing commands are not cached but instead are sent to the display. More...
 
Display::ColorModel colorModel () const
 return the colorModel used for multichannel color More...
 
void setColorModel (Display::ColorModel colorModel)
 Set the input color model for multichannel color. More...
 
casacore::Bool refreshActive () const
 return true if the refresh is active (Added for X11PixelCanvas DefaultBuffer) More...
 
virtual casacore::Float pixelScaling () const
 

Static Public Member Functions

static void copyBuffer (GLenum from, GLenum to, GLint x, GLint y, GLsizei width, GLsizei height)
 buffer memory exchanges (Not cacheable) More...
 
static int glCheck (const char *msg=NULL, casacore::uInt nspaces=0)
 
static void drawPixels (GLfloat x, GLfloat y, GLfloat z, GLsizei width, GLsizei height, GLfloat xscale, GLfloat yscale, GLenum format, GLenum type, const GLvoid *pixels)
 

Private Member Functions

void exposeHandler ()
 Handle the X expose event. More...
 
void resizeHandler ()
 Called when window is resized. More...
 
void handleEvents (Widget w, XEvent *ev)
 
Boolean handleResizeEvent (casacore::uInt w, casacore::uInt h)
 
void initComponents ()
 
GLPCDisplayListcreateList (const char *name=NULL)
 Internal handling of display lists. More...
 
casacore::uInt makeList (const char *name=NULL)
 Create a new display list and add to the list of lists. More...
 
void resizeList ()
 Grow the list. More...
 
void cleanLists ()
 Go through the list of display lists removing any unused lists. More...
 
void purgeLists ()
 Called when the window is resized or cleared. More...
 
Boolean removeList (casacore::uInt listid)
 Remove a display list from list of lists. More...
 
void beginListEntry (const char *name=NULL)
 Called to begin caching. More...
 
void beginListEntry (GLPCDisplayListElement *e)
 
void endListEntry ()
 Called to end caching. More...
 
void traceCheck (const char *name, casacore::uLong traceLevel, casacore::uInt nspaces)
 Print <name> if tracing is turned on. More...
 
void traceCheck (const char *name, casacore::uLong traceLevel)
 
void storeColorValue (GLPCColorValue &v, casacore::uLong value)
 Store the new value in the struct. More...
 
void storeColorIndex (GLPCColorValue &v, casacore::uInt index)
 If RGB mode, index is interpreted as an index into the virtual CT. More...
 
void storeColorValue (GLPCColorValue &v, casacore::Float r, casacore::Float g, casacore::Float b)
 
void storeColorValue (GLPCColorValue &v, casacore::Float r, casacore::Float g, casacore::Float b, casacore::Float a)
 
void setCurrentColorIndex (casacore::uInt index, const char *name=NULL)
 index is always treated as an index. More...
 
void setCurrentColorValue (casacore::uLong value, const char *name=NULL)
 
void setCurrentColorValue (casacore::Float r, casacore::Float g, casacore::Float b, const char *name=NULL)
 
void setCurrentColorValue (casacore::Float r, casacore::Float g, casacore::Float b, casacore::Float a, const char *name=NULL)
 
void setCurrentColorValue (const GLPCColorValue &v, const char *name=NULL)
 
void setClearColorIndex (casacore::uInt index, const char *name=NULL)
 
void setClearColorValue (casacore::uLong index, const char *name=NULL)
 
void setClearColorValue (casacore::Float r, casacore::Float g, casacore::Float b, const char *name=NULL)
 
void setClearColorValue (casacore::Float r, casacore::Float g, casacore::Float b, casacore::Float a, const char *name=NULL)
 
void setClearColorValue (const GLPCColorValue &v, const char *name=NULL)
 Tell OpenGL to use the given color index or RGB value depending on whether we're in Index or RGB mode. More...
 
void drawColoredPoints_ (const char *Name, const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const casacore::Vector< casacore::uInt > &colors)
 Internal versions of public functions. More...
 
void drawColoredPoints_ (const char *Name, const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const casacore::Vector< casacore::uInt > &colors)
 
void drawColoredPoints_ (const char *Name, const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const casacore::Vector< casacore::uInt > &colors)
 
void pRWbuf (const char *str=NULL, int nspaces=0)
 
void warn (const char *routine, const char *msg, const SourceLocation *where) const
 Routines to print warnings. More...
 
void unimplemented (const char *routine, const SourceLocation *where) const
 

Static Private Member Functions

static void handleEventsCB (Widget w, GLPixelCanvas *xpc, XEvent *ev, Boolean *)
 Event Handling. More...
 
static void colorTableResizeCB (PixelCanvasColorTable *pcctbl, casacore::uInt, GLPixelCanvas *xpc, Display::RefreshReason reason)
 handle colorTable resize More...
 

Private Attributes

::XDisplay * display_
 
Widget parent_
 
Widget form_
 
Widget drawArea_
 
XVisualInfo * visualInfo_
 
Visual * visual_
 
casacore::uInt BlackPixel_
 
casacore::Bool doubleBuffered_
 GL information. More...
 
casacore::Bool isRGB_
 
GLPixelCanvasColorTableglpcctbl_
 
GLXContext context_
 
GLbitfield bufferMask_
 
casacore::uInt width_
 
casacore::uInt height_
 
casacore::uInt depth_
 
Boolean doClipping_
 
casacore::Int clipX1_
 
casacore::Int clipY1_
 
casacore::Int clipX2_
 
casacore::Int clipY2_
 
casacore::String itsDeviceForegroundColor_
 
casacore::String itsDeviceBackgroundColor_
 
GLPCColorValue currentColor_
 Current color. More...
 
GLPCColorValue clearColor_
 Clear color. More...
 
Display::LineStyle lineStyle_
 
Display::FillStyle fillStyle_
 
Boolean exposeHandlerFirstTime_
 
casacore::uShortitsComponents_
 Component / multi-channel buffers etc. More...
 
casacore::Float itsComponentX_
 
casacore::Float itsComponentY_
 
casacore::Float itsComponentZ_
 
casacore::Float itsComponentScaleX_
 
casacore::Float itsComponentScaleY_
 
casacore::uLong itsComponentWidth_
 
casacore::uLong itsComponentHeight_
 
casacore::uInt listSize_
 Display lists. More...
 
casacore::uInt numinuse_
 
casacore::uInt nextfree_
 
casacore::uInt sizeincr_
 
casacore::uInt currentListID_
 
GLPCDisplayList ** dlists_
 
GLPCDisplayListElementcurrentElement_
 
Boolean trace_
 
casacore::uLong traceLevel_
 
casacore::uInt nspaces_
 
GLLogIO log_
 
Boolean autoRefresh_
 

Additional Inherited Members

- Protected Member Functions inherited from casa::PixelCanvas
 PixelCanvas ()
 Abstract base class idiom. More...
 
 PixelCanvas (const PixelCanvas *)
 
 PixelCanvas (PixelCanvasColorTable *pcctbl)
 
void setDrawMode (Display::DrawMode mode)
 Only allowed by derived classes. More...
 
void setDrawBuffer_ (Display::DrawBuffer buf)
 Also allowed only by derived classes. More...
 
- Protected Attributes inherited from casa::PixelCanvas
casacore::Bool defaultColormapActive_
 true if the PixelCanvas was the one who registered the existing colortable More...
 

Detailed Description

OpenGL implementation of PixelCanvas.

Intended use:

Public interface

Prerequisite

Synopsis

Implementation of PixelCanvas for OpenGL. Most, but not all of the PixelCanvas functions are available. There is very little support for 3D.

Thrown Exceptions

Definition at line 76 of file GLPixelCanvas.h.

Constructor & Destructor Documentation

casa::GLPixelCanvas::GLPixelCanvas ( Widget  parent,
GLPixelCanvasColorTable glpcctbl,
casacore::uInt  width,
casacore::uInt  height 
)


Caution: Drawing can not take place until the window exists!

virtual casa::GLPixelCanvas::~GLPixelCanvas ( )
virtual

Member Function Documentation

Boolean casa::GLPixelCanvas::autoRefresh ( ) const
inline

Normally GLPixelCanvas repaints the window when it is damaged.

If the user wishes to handle this, turn off auto refreshing.

Definition at line 649 of file GLPixelCanvas.h.

References autoRefresh_.

void casa::GLPixelCanvas::autoRefresh ( Boolean  refresh)
inline

Definition at line 652 of file GLPixelCanvas.h.

References autoRefresh_, and refresh().

void casa::GLPixelCanvas::beginListEntry ( const char *  name = NULL)
private

Called to begin caching.

void casa::GLPixelCanvas::beginListEntry ( GLPCDisplayListElement e)
private
virtual void casa::GLPixelCanvas::bufferComponent ( const casacore::Matrix< casacore::uInt > &  data,
const casacore::Int x,
const casacore::Int y,
const Display::ColorComponent colorcomponent 
)
virtual

Fill one of the channel buffers.

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::bufferZValue ( const casacore::Float  z = 0.0)
inline

Definition at line 612 of file GLPixelCanvas.h.

References itsComponentZ_.

void casa::GLPixelCanvas::cleanLists ( )
private

Go through the list of display lists removing any unused lists.

virtual void casa::GLPixelCanvas::clear ( )
virtual

(Cacheable) Clear the window using the background color
Tip: If you want to clear the window use clear(), not clear(IIII);

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::clear ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

Implements casa::PixelCanvas.

virtual casacore::uInt casa::GLPixelCanvas::clearColor ( ) const
virtual

(Not Cacheable) Get the current color to use for clearing the display.

Implements casa::PixelCanvas.

virtual casacore::uInt casa::GLPixelCanvas::color ( ) const
virtual

(Not Cacheable) Returns the current color as a color index
Note: In RGB mode, this is only valid if setColor(index) has been called;

Implements casa::PixelCanvas.

static void casa::GLPixelCanvas::colorTableResizeCB ( PixelCanvasColorTable pcctbl,
casacore::uInt  ,
GLPixelCanvas xpc,
Display::RefreshReason  reason 
)
staticprivate

handle colorTable resize

virtual void casa::GLPixelCanvas::copyBackBufferToFrontBuffer ( )
virtual

buffer memory exchanges (Not cacheable)

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::copyBackBufferToFrontBuffer ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

partial buffer memory exchanges.

(x1,y1 are blc, x2,y2 are trc) None of these are implemented.

Implements casa::PixelCanvas.

static void casa::GLPixelCanvas::copyBuffer ( GLenum  from,
GLenum  to,
GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
static

buffer memory exchanges (Not cacheable)


Caution: Of this group, only swapbuffers() works;

void casa::GLPixelCanvas::copyBuffer ( GLenum  from,
GLenum  to 
)
virtual void casa::GLPixelCanvas::copyFrontBufferToBackBuffer ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::copyFrontBufferToBackBuffer ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

Implements casa::PixelCanvas.

GLPCDisplayList* casa::GLPixelCanvas::createList ( const char *  name = NULL)
private

Internal handling of display lists.

There is a list of GLPCDisplayLists. Item 0 always exists and is used to redraw the window after expose events. Any other entries are created in response to newList() calls.

Return a pointer to a new GLPC display list.

virtual void casa::GLPixelCanvas::deleteList ( casacore::uInt  list)
virtual

remove list from cache

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::deleteLists ( )
virtual

flush all lists from the cache

Implements casa::PixelCanvas.

virtual casacore::uInt casa::GLPixelCanvas::depth ( ) const
virtual

Return the depth of the GLPixelCanvas in bits.

Implements casa::PixelCanvas.

virtual casacore::String casa::GLPixelCanvas::deviceBackgroundColor ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::String casa::GLPixelCanvas::deviceForegroundColor ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::disable ( Display::Option  option)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::disableMotionEvents ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::disablePositionEvents ( )
virtual

Implements casa::PixelCanvas.

Boolean casa::GLPixelCanvas::doubleBuffered ( ) const
inline

Definition at line 660 of file GLPixelCanvas.h.

References doubleBuffered_.

virtual void casa::GLPixelCanvas::drawColoredLines ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1,
const casacore::Vector< casacore::Int > &  x2,
const casacore::Vector< casacore::Int > &  y2,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

(Cacheable) Draw a set of lines, specifying a color per line to be drawn.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredLines ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  x2,
const casacore::Vector< casacore::Float > &  y2,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredLines ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1,
const casacore::Vector< casacore::Double > &  x2,
const casacore::Vector< casacore::Double > &  y2,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

(Cacheable) Draw a set of points, specifying a color per point to be drawn.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Matrix< casacore::Int > &  xy,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Reimplemented from casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Matrix< casacore::Float > &  xy,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Reimplemented from casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawColoredPoints ( const casacore::Matrix< casacore::Double > &  xy,
const casacore::Vector< casacore::uInt > &  colors 
)
virtual

Reimplemented from casa::PixelCanvas.

void casa::GLPixelCanvas::drawColoredPoints_ ( const char *  Name,
const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
private

Internal versions of public functions.

void casa::GLPixelCanvas::drawColoredPoints_ ( const char *  Name,
const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
private
void casa::GLPixelCanvas::drawColoredPoints_ ( const char *  Name,
const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1,
const casacore::Vector< casacore::uInt > &  colors 
)
private
virtual void casa::GLPixelCanvas::drawFilledPolygon ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1 
)
virtual

(Cacheable) Draw and fill a closed polygon

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawFilledPolygon ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawFilledPolygon ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawFilledPolygon3D ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  z1 
)
virtual
virtual void casa::GLPixelCanvas::drawFilledRectangle ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a filled rectangle

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawFilledRectangle ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  x2,
casacore::Float  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawFilledRectangle ( casacore::Double  x1,
casacore::Double  y1,
casacore::Double  x2,
casacore::Double  y2 
)
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::drawGLImage ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLsizei  width,
GLsizei  height,
GLfloat  xscale,
GLfloat  yscale,
GLenum  format,
const GLushort *  pixels 
)

Calls drawImagePixels if in indexed mode or drawTexturedImage if RGB.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::uInt > &  data,
casacore::Int  x,
casacore::Int  y 
)
virtual

(Cacheable) Draw an array of 2D color data as a raster image for zoom = <1,1>

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Int > &  data,
casacore::Int  x,
casacore::Int  y 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::uLong > &  data,
casacore::Int  x,
casacore::Int  y 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Float > &  data,
casacore::Int  x,
casacore::Int  y 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Double > &  data,
casacore::Int  x,
casacore::Int  y 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Int x,
const casacore::Int y,
const casacore::Matrix< casacore::uInt > &  data,
const casacore::Matrix< casacore::Bool > &  mask,
casacore::Bool  opaqueMask = false 
)
virtual

(Cacheable) Draw an array of 2D color data as a raster image, taking note of the casacore::Bool mask.

(opaqueMask ignored/unimplemented)

Reimplemented from casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::uInt > &  data,
casacore::Int  x,
casacore::Int  y,
casacore::uInt  xzoom,
casacore::uInt  yzoom 
)
virtual

(Cacheable) Draw an array of 2D color data as a raster image for any positive integer zoom

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Int > &  data,
casacore::Int  x,
casacore::Int  y,
casacore::uInt  xzoom,
casacore::uInt  yzoom 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::uLong > &  data,
casacore::Int  x,
casacore::Int  y,
casacore::uInt  xzoom,
casacore::uInt  yzoom 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Float > &  data,
casacore::Int  x,
casacore::Int  y,
casacore::uInt  xzoom,
casacore::uInt  yzoom 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::Double > &  data,
casacore::Int  x,
casacore::Int  y,
casacore::uInt  xzoom,
casacore::uInt  yzoom 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawImage ( const casacore::Matrix< casacore::uInt > &  data,
const casacore::Int x,
const casacore::Int y,
const Display::ColorComponent colorcomponent 
)
virtual

(Cacheable) Draw a component of a multi-channel image, storing it in buffers until flushComponentImages() is called.

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::drawImagePixels ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLsizei  width,
GLsizei  height,
GLfloat  xscale,
GLfloat  yscale,
GLenum  format,
const GLushort *  pixels 
)
virtual void casa::GLPixelCanvas::drawLine ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a single line using current color

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLine ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  x2,
casacore::Float  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLine ( casacore::Double  x1,
casacore::Double  y1,
casacore::Double  x2,
casacore::Double  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLine3D ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  z1,
casacore::Float  x2,
casacore::Float  y2,
casacore::Float  z2 
)
virtual
virtual void casa::GLPixelCanvas::drawLines ( const casacore::Matrix< casacore::Int > &  verts)
virtual

(Cacheable) Draw N/2 lines from an Nx2 matrix

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines ( const casacore::Matrix< casacore::Float > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines ( const casacore::Matrix< casacore::Double > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1,
const casacore::Vector< casacore::Int > &  x2,
const casacore::Vector< casacore::Int > &  y2 
)
virtual

(Cacheable) Draw a bunch of unrelated lines using current color

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  x2,
const casacore::Vector< casacore::Float > &  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1,
const casacore::Vector< casacore::Double > &  x2,
const casacore::Vector< casacore::Double > &  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawLines3D ( const casacore::Matrix< casacore::Float > &  verts)
virtual
virtual void casa::GLPixelCanvas::drawList ( casacore::uInt  list)
virtual

(Cacheable) recall cached display commands

Implements casa::PixelCanvas.

static void casa::GLPixelCanvas::drawPixels ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLsizei  width,
GLsizei  height,
GLfloat  xscale,
GLfloat  yscale,
GLenum  format,
GLenum  type,
const GLvoid *  pixels 
)
static
virtual void casa::GLPixelCanvas::drawPoint ( casacore::Int  x1,
casacore::Int  y1 
)
virtual

(Cacheable) Draw a single point using current color

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoint ( casacore::Float  x1,
casacore::Float  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoint ( casacore::Double  x1,
casacore::Double  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoint3D ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  z1 
)
virtual
virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Matrix< casacore::Int > &  verts)
virtual

(Cacheable) Draw N points specified as a Nx2 matrix

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Matrix< casacore::Float > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Matrix< casacore::Double > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1 
)
virtual

(Cacheable) Draw a bunch of points using current color

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPoints ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1 
)
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::drawPoints3D ( const casacore::Matrix< casacore::Float > &  verts)
virtual void casa::GLPixelCanvas::drawPoints3D ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  z1 
)
virtual
virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1 
)
virtual

(Cacheable) Draw a closed polygon

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Matrix< casacore::Int > &  verts)
virtual

(Cacheable) Draw a closed N-sided polygon from Nx2 matrix of vertices

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Matrix< casacore::Float > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon ( const casacore::Matrix< casacore::Double > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolygon3D ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  z1 
)
virtual
virtual void casa::GLPixelCanvas::drawPolygon3D ( const casacore::Matrix< casacore::Float > &  verts)
virtual
virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1 
)
virtual

(Cacheable) Draw a single connected line between the given points.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Matrix< casacore::Int > &  verts)
virtual

(Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Matrix< casacore::Float > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline ( const casacore::Matrix< casacore::Double > &  verts)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawPolyline3D ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const casacore::Vector< casacore::Float > &  z1 
)
virtual
virtual void casa::GLPixelCanvas::drawRectangle ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a rectangle

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawRectangle ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  x2,
casacore::Float  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawRectangle ( casacore::Double  x1,
casacore::Double  y1,
casacore::Double  x2,
casacore::Double  y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::drawText ( casacore::Int  x,
casacore::Int  y,
const casacore::String text,
Display::TextAlign  alignment = Display::AlignCenter 
)
virtual

(Cacheable) Draw text using that font aligned in some way to the position.

(unimplemented)

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::drawTexturedImage ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLsizei  width,
GLsizei  height,
GLfloat  xscale,
GLfloat  yscale,
GLenum  format,
const GLushort *  pixels,
GLPCTextureParams params = NULL 
)

Various ways to draw images.

Used internally.

virtual casacore::Bool casa::GLPixelCanvas::enable ( Display::Option  option)
virtual

(Cacheable) Option Control Options listed in DisplayEnums Only Display::ClipWindow is implemented.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::enableMotionEvents ( )
virtual

enabling/disabling of event tracking (unimplemented)

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::enablePositionEvents ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::endList ( )
virtual

end caching display commands

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::endListEntry ( )
private

Called to end caching.

void casa::GLPixelCanvas::exposeHandler ( )
private

Handle the X expose event.

This is caught by the pixel canvas and forwarded as a refresh event only if the pixel canvas changed dimensions. If there was no size change, the pixel canvas simply copies its pixmap to the display without generating a refresh.

virtual void casa::GLPixelCanvas::flush ( )
virtual

Cause display to flush any graphics commands not yet drawn.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::flushComponentBuffers ( )
virtual

(NOT CACHEABLE!) Flush the component buffers.

Implements casa::PixelCanvas.

virtual Display::ArcMode casa::GLPixelCanvas::getArcMode ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::uLong casa::GLPixelCanvas::getBackground ( ) const
virtual

Unimplemented get Graphics Attributes.

Implements casa::PixelCanvas.

virtual Display::CapStyle casa::GLPixelCanvas::getCapStyle ( ) const
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::getClearColor ( float &  r,
float &  g,
float &  b 
) const
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::getClipWindow ( casacore::Int x1,
casacore::Int y1,
casacore::Int x2,
casacore::Int y2 
)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::getColor ( float &  r,
float &  g,
float &  b 
) const
virtual

(Not Cacheable) Retuns the current color as an RGB triple

Implements casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::getColor ( casacore::Int  x,
casacore::Int  y,
casacore::uInt color 
)
virtual

(Not Cacheable) Get color index value (works in RGB or colormap mode)
Tip: Don't bother; No existing canvas implements these;

Implements casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::getColorComponents ( const casacore::String colorname,
casacore::Float r,
casacore::Float g,
casacore::Float b 
)
virtual

Get color components in range 0 to 1 without actually allocating the color.

This is needed to set up other devices, for example PgPlot.

Implements casa::PixelCanvas.

virtual Display::DrawFunction casa::GLPixelCanvas::getDrawFunction ( ) const
virtual

Get Graphics Attributes.

Implements casa::PixelCanvas.

virtual Display::FillRule casa::GLPixelCanvas::getFillRule ( ) const
virtual

Implements casa::PixelCanvas.

virtual Display::FillStyle casa::GLPixelCanvas::getFillStyle ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::uLong casa::GLPixelCanvas::getForeground ( ) const
virtual

Implemented get Graphics Attributes functions.

Implements casa::PixelCanvas.

virtual Display::JoinStyle casa::GLPixelCanvas::getJoinStyle ( ) const
virtual

Implements casa::PixelCanvas.

virtual Display::LineStyle casa::GLPixelCanvas::getLineStyle ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::Float casa::GLPixelCanvas::getLineWidth ( ) const
virtual
virtual casacore::Bool casa::GLPixelCanvas::getRGBColor ( casacore::Int  x,
casacore::Int  y,
float &  r,
float &  g,
float &  b 
)
virtual

This should be removed since no one implements it.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::getTranslation ( casacore::Int xt,
casacore::Int yt 
) const
virtual


Tip: get/x/yTranslation are not currently implemented;

Implements casa::PixelCanvas.

int casa::GLPixelCanvas::glcheck ( const char *  msg = NULL,
casacore::uInt  nspaces = 0 
)

Print any GL error messages.

if msg is non NULL, it is printed first if there is an error. nspaces is the number of spaces to indent the text. Returns the number of errors. Usually only used internally.

static int casa::GLPixelCanvas::glCheck ( const char *  msg = NULL,
casacore::uInt  nspaces = 0 
)
static
virtual GLPixelCanvasColorTable* casa::GLPixelCanvas::glpcctbl ( ) const
inlinevirtual

Need a mechanism to return the GLPixelCanvasColorTable so drawing functions within classes can operate.

Definition at line 503 of file GLPixelCanvas.h.

References glpcctbl_.

void casa::GLPixelCanvas::GLPixelCanvas::drawIndexedImage ( const casacore::Matrix< casacore::uInt > &  data,
casacore::Float  x = 0.0,
casacore::Float  y = 0.0,
casacore::Float  z = 0.0,
casacore::Float  xscl = 1.0,
casacore::Float  yscl = 1.0 
)

(Cacheable) Draw an image using color indexes.

If in RGB mode, the virtual colortable is used.

void casa::GLPixelCanvas::handleEvents ( Widget  w,
XEvent *  ev 
)
private
static void casa::GLPixelCanvas::handleEventsCB ( Widget  w,
GLPixelCanvas xpc,
XEvent *  ev,
Boolean *   
)
staticprivate

Event Handling.

Boolean casa::GLPixelCanvas::handleResizeEvent ( casacore::uInt  w,
casacore::uInt  h 
)
private
virtual casacore::uInt casa::GLPixelCanvas::height ( ) const
virtual

Return the height of the GLPixelCanvas in pixels.

Implements casa::PixelCanvas.

virtual Display::ImageCacheStrategy casa::GLPixelCanvas::imageCacheStrategy ( ) const
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::initComponents ( )
private
Boolean casa::GLPixelCanvas::isRGB ( ) const
inline

Definition at line 663 of file GLPixelCanvas.h.

References isRGB_.

virtual void casa::GLPixelCanvas::loadIdentity ( )
virtual

zero the current translation

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::makeCurrent ( )

Make this canvas's context current.


Caution: This must be called when switching between GLPixelCanvases or else drawing will go to the wrong canvas; It is not needed unless more than one GLPixelCanvas is active at a time;

casacore::uInt casa::GLPixelCanvas::makeList ( const char *  name = NULL)
private

Create a new display list and add to the list of lists.

virtual casacore::uInt casa::GLPixelCanvas::newList ( )
virtual

begin caching display commands - return list ID

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::note ( const char *  note)

Add a note entry to traced output.

PixelCanvasColorTable* casa::GLPixelCanvas::pcctbl ( ) const
inlinevirtual

Return the pixel canvas color table.

Implements casa::PixelCanvas.

Definition at line 507 of file GLPixelCanvas.h.

References glpcctbl_.

virtual void casa::GLPixelCanvas::pixelDensity ( casacore::Float xdpi,
casacore::Float ydpi 
) const
virtual

Get the pixel density (in dots per inch [dpi]) of the GLPixelCanvas
Tip: The X server is queried; It may or may not have the correct answer;

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::popAttrib ( )
virtual void casa::GLPixelCanvas::popMatrix ( )
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::postString ( )
inline

Definition at line 639 of file GLPixelCanvas.h.

References log_, and casa::GLLogIO::postString().

void casa::GLPixelCanvas::postToStream ( casacore::Bool  p = false)
inline

Definition at line 633 of file GLPixelCanvas.h.

References log_, and casa::GLLogIO::postToStream().

void casa::GLPixelCanvas::postToString ( casacore::String s = NULL)
inline

Definition at line 636 of file GLPixelCanvas.h.

References log_, and casa::GLLogIO::postToString().

void casa::GLPixelCanvas::pRWbuf ( const char *  str = NULL,
int  nspaces = 0 
)
private
void casa::GLPixelCanvas::purgeLists ( )
private

Called when the window is resized or cleared.

Deletes the repaint list.

void casa::GLPixelCanvas::pushAttrib ( const GLbitfield  attrib)

OpenGL's push/popAttrib functions.

virtual void casa::GLPixelCanvas::pushMatrix ( )
virtual

save/restore the current translation.

This is called pushMatrix because eventually we may want scaling or rotation to play a modest role here.
Tip: GLPixelCanvas uses OpenGL's push/pop matrix;

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::redraw ( )
inline

(Not Cacheable) Redraw the window

Definition at line 399 of file GLPixelCanvas.h.

References repaint().

virtual void casa::GLPixelCanvas::refresh ( const Display::RefreshReason reason = Display::UserCommand,
const casacore::Bool explicitrequest = true 
)
virtual

Implements casa::PixelCanvas.

Referenced by autoRefresh().

virtual casacore::Bool casa::GLPixelCanvas::refreshAllowed ( ) const
virtual

return true if refresh is allowed right now...

Reimplemented from casa::PixelCanvas.

Boolean casa::GLPixelCanvas::removeList ( casacore::uInt  listid)
private

Remove a display list from list of lists.

Returns true if list was removed. false if listid is invalid or list has already been removed.

void casa::GLPixelCanvas::repaint ( const casacore::Bool  redraw = false)

Just redraws window.

(If redraw is T, the window will be redrawn. If F, it will only be redrawn if autoRefresh is T.

Referenced by redraw().

virtual casacore::Bool casa::GLPixelCanvas::resize ( casacore::uInt  reqXSize,
casacore::uInt  reqYSize,
casacore::Bool  doCallbacks = true 
)
virtual

(Not Cacheable) resize request.

returns true if window was resized. Will refresh if doCallbacks is true.

Reimplemented from casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::resizeColorTable ( casacore::uInt  newSize)
virtual

(Not Cacheable) resize the colortable by requesting a new number of cells

Implements casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::resizeColorTable ( casacore::uInt  nReds,
casacore::uInt  nGreens,
casacore::uInt  nBlues 
)
virtual

(Not Cacheable) resize the colortable by requesting a new RGB/HSV cube

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::resizeHandler ( )
private

Called when window is resized.

void casa::GLPixelCanvas::resizeList ( )
private

Grow the list.

virtual void casa::GLPixelCanvas::setArcMode ( Display::ArcMode  mode)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setBackground ( casacore::uLong  color)
virtual

Unimplemented set graphics functions.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setCapStyle ( Display::CapStyle  style)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setClearColor ( casacore::uInt  colorIndex)
virtual

(Cacheable) Set the color to use for clearing the display

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setClearColor ( const casacore::String colorname)
virtual


Caution: Setting named colors for Index mode isn't implemented;

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setClearColor ( float  r,
float  g,
float  b 
)
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::setClearColorIndex ( casacore::uInt  index,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setClearColorValue ( casacore::uLong  index,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setClearColorValue ( casacore::Float  r,
casacore::Float  g,
casacore::Float  b,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setClearColorValue ( casacore::Float  r,
casacore::Float  g,
casacore::Float  b,
casacore::Float  a,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setClearColorValue ( const GLPCColorValue v,
const char *  name = NULL 
)
private

Tell OpenGL to use the given color index or RGB value depending on whether we're in Index or RGB mode.

If name is not NULL, wrap the call in the usual begin/endListEntry, tracecheck.

virtual void casa::GLPixelCanvas::setClipWindow ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Setup the clip window.

The clip window, when enabled, allows a user to clip all graphics output to a rectangular region on the screen.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setColor ( casacore::uInt  colorIndex)
virtual

(Cacheable) Set current color (works in RGB or colormap mode)


Tip: setColor(colorIndex) when called in RGB mode gets the RGB values from the virtual color table; setForeground assumes the value is a packed pixel;

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setColor ( const casacore::String colorname)
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::setCurrentColorIndex ( casacore::uInt  index,
const char *  name = NULL 
)
private

index is always treated as an index.

(In RGB mode, the virtual color table is used.

void casa::GLPixelCanvas::setCurrentColorValue ( casacore::uLong  value,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setCurrentColorValue ( casacore::Float  r,
casacore::Float  g,
casacore::Float  b,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setCurrentColorValue ( casacore::Float  r,
casacore::Float  g,
casacore::Float  b,
casacore::Float  a,
const char *  name = NULL 
)
private
void casa::GLPixelCanvas::setCurrentColorValue ( const GLPCColorValue v,
const char *  name = NULL 
)
private
virtual void casa::GLPixelCanvas::setDeviceBackgroundColor ( const casacore::String  colorname)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setDeviceForegroundColor ( const casacore::String  colorname)
virtual

Get/set the current foreground/background colors.

These colors should be used when the special Strings "foreground" and "background" are given for a color.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setDrawBuffer ( Display::DrawBuffer  buf)
virtual

(Not cacheable) set the draw buffer
Caution: The draw buffer is always set to BACK if double buffered and FRONT if single buffered;

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setDrawFunction ( Display::DrawFunction  function)
virtual

Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setFillRule ( Display::FillRule  rule)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setFillStyle ( Display::FillStyle  style)
virtual

Implements casa::PixelCanvas.

virtual casacore::Bool casa::GLPixelCanvas::setFont ( const casacore::String fontName)
virtual

(Cacheable) Set the font to the recognizable font name.

(unimplemented)

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setForeground ( casacore::uLong  color)
virtual

Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setImageCacheStrategy ( Display::ImageCacheStrategy  strategy)
virtual

Control the image-caching strategy.

(Ignored)

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setJoinStyle ( Display::JoinStyle  style)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setLineStyle ( Display::LineStyle  style)
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::setLineWidth ( casacore::Float  width)
virtual

virtual void setLineWidth(casacore::uInt width) = 0;

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::setPcctbl ( PixelCanvasColorTable pcctbl)
inlinevirtual

Implements casa::PixelCanvas.

Definition at line 511 of file GLPixelCanvas.h.

References glpcctbl_.

void casa::GLPixelCanvas::setPointSize ( const casacore::uInt  pointsize)

(cacheable) Change the size of the points (in pixels) drawn by drawPoints.

virtual void casa::GLPixelCanvas::setRGBColor ( float  r,
float  g,
float  b 
)
virtual


Caution: Calling setRGBColor when in Index mode ignores r, g & b and uses the current index value;

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::storeColorIndex ( GLPCColorValue v,
casacore::uInt  index 
)
private

If RGB mode, index is interpreted as an index into the virtual CT.

void casa::GLPixelCanvas::storeColorValue ( GLPCColorValue v,
casacore::uLong  value 
)
private

Store the new value in the struct.

If RGB mode, index is interpreted as a packed RGB value.

void casa::GLPixelCanvas::storeColorValue ( GLPCColorValue v,
casacore::Float  r,
casacore::Float  g,
casacore::Float  b 
)
private
void casa::GLPixelCanvas::storeColorValue ( GLPCColorValue v,
casacore::Float  r,
casacore::Float  g,
casacore::Float  b,
casacore::Float  a 
)
private
virtual casacore::Bool casa::GLPixelCanvas::supportsLists ( )
virtual

Does this canvas support cached display lists? The user of the canvas should always check this, because undefined behaviour can result when an attempt is made to use a list on a PixelCanvas which does not support lists.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::swapBuffers ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::swapBuffers ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::trace ( Boolean  trace)
inline

Tracing support.

May be useful when debugging graphics code.

Turn tracing on/off.

Definition at line 619 of file GLPixelCanvas.h.

References trace_.

void casa::GLPixelCanvas::traceCheck ( const char *  name,
casacore::uLong  traceLevel,
casacore::uInt  nspaces 
)
private

Print <name> if tracing is turned on.

Most user callable drawing routines call this.

Referenced by traceCheck().

void casa::GLPixelCanvas::traceCheck ( const char *  name,
casacore::uLong  traceLevel 
)
inlineprivate

Definition at line 723 of file GLPixelCanvas.h.

References nspaces_, and traceCheck().

void casa::GLPixelCanvas::traceLevel ( const casacore::uLong  traceLevel)
inline

Set trace level.

(actually a mask). default is GLTraceNormal. NOT fully implemented.

Definition at line 627 of file GLPixelCanvas.h.

References traceLevel(), and traceLevel_.

casacore::uLong casa::GLPixelCanvas::traceLevel ( ) const
inline

Definition at line 630 of file GLPixelCanvas.h.

References traceLevel_.

Referenced by traceLevel().

Boolean casa::GLPixelCanvas::tracing ( ) const
inline

Definition at line 622 of file GLPixelCanvas.h.

References trace_.

virtual void casa::GLPixelCanvas::translate ( casacore::Int  xt,
casacore::Int  yt 
)
virtual

translation functions translate applies a relative translation to the current matrix and can be used to position graphics.

Together with pushMatrix and popMatrix it can be used to build heirarchical scenes.

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::translateAllLists ( casacore::Int  xt,
casacore::Int  yt 
)
virtual

translate all lists

Implements casa::PixelCanvas.

virtual void casa::GLPixelCanvas::translateList ( casacore::uInt  list,
casacore::Int  xt,
casacore::Int  yt 
)
virtual

translate the list

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::unimplemented ( const char *  routine,
const SourceLocation *  where 
) const
private
virtual casacore::Bool casa::GLPixelCanvas::validList ( casacore::uInt  list)
virtual

return true if the list exists

Implements casa::PixelCanvas.

void casa::GLPixelCanvas::waitGL ( )
void casa::GLPixelCanvas::waitX ( )

Wait for X or GL commands to finish.

Usually not needed.

void casa::GLPixelCanvas::warn ( const char *  routine,
const char *  msg,
const SourceLocation *  where 
) const
private

Routines to print warnings.

virtual casacore::uInt casa::GLPixelCanvas::width ( ) const
virtual

Return the width of the GLPixelCanvas in pixels.

Implements casa::PixelCanvas.

virtual casacore::Int casa::GLPixelCanvas::xTranslation ( ) const
virtual

Implements casa::PixelCanvas.

virtual casacore::Int casa::GLPixelCanvas::yTranslation ( ) const
virtual

Implements casa::PixelCanvas.

Member Data Documentation

Boolean casa::GLPixelCanvas::autoRefresh_
private

Definition at line 832 of file GLPixelCanvas.h.

Referenced by autoRefresh().

casacore::uInt casa::GLPixelCanvas::BlackPixel_
private

Definition at line 790 of file GLPixelCanvas.h.

GLbitfield casa::GLPixelCanvas::bufferMask_
private

Definition at line 797 of file GLPixelCanvas.h.

GLPCColorValue casa::GLPixelCanvas::clearColor_
private

Clear color.

Definition at line 808 of file GLPixelCanvas.h.

casacore::Int casa::GLPixelCanvas::clipX1_
private

Definition at line 802 of file GLPixelCanvas.h.

casacore::Int casa::GLPixelCanvas::clipX2_
private

Definition at line 803 of file GLPixelCanvas.h.

casacore::Int casa::GLPixelCanvas::clipY1_
private

Definition at line 802 of file GLPixelCanvas.h.

casacore::Int casa::GLPixelCanvas::clipY2_
private

Definition at line 803 of file GLPixelCanvas.h.

GLXContext casa::GLPixelCanvas::context_
private

Definition at line 796 of file GLPixelCanvas.h.

GLPCColorValue casa::GLPixelCanvas::currentColor_
private

Current color.

Definition at line 806 of file GLPixelCanvas.h.

GLPCDisplayListElement* casa::GLPixelCanvas::currentElement_
private

Definition at line 826 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::currentListID_
private

Definition at line 824 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::depth_
private

Definition at line 800 of file GLPixelCanvas.h.

::XDisplay* casa::GLPixelCanvas::display_
private

Definition at line 784 of file GLPixelCanvas.h.

GLPCDisplayList** casa::GLPixelCanvas::dlists_
private

Definition at line 825 of file GLPixelCanvas.h.

Boolean casa::GLPixelCanvas::doClipping_
private

Definition at line 801 of file GLPixelCanvas.h.

casacore::Bool casa::GLPixelCanvas::doubleBuffered_
private

GL information.

Definition at line 792 of file GLPixelCanvas.h.

Referenced by doubleBuffered().

Widget casa::GLPixelCanvas::drawArea_
private

Definition at line 787 of file GLPixelCanvas.h.

Boolean casa::GLPixelCanvas::exposeHandlerFirstTime_
private

Definition at line 813 of file GLPixelCanvas.h.

Display::FillStyle casa::GLPixelCanvas::fillStyle_
private

Definition at line 811 of file GLPixelCanvas.h.

Widget casa::GLPixelCanvas::form_
private

Definition at line 786 of file GLPixelCanvas.h.

GLPixelCanvasColorTable* casa::GLPixelCanvas::glpcctbl_
private

Definition at line 795 of file GLPixelCanvas.h.

Referenced by glpcctbl(), pcctbl(), and setPcctbl().

casacore::uInt casa::GLPixelCanvas::height_
private

Definition at line 799 of file GLPixelCanvas.h.

casacore::Bool casa::GLPixelCanvas::isRGB_
private

Definition at line 793 of file GLPixelCanvas.h.

Referenced by isRGB().

casacore::uLong casa::GLPixelCanvas::itsComponentHeight_
private

Definition at line 818 of file GLPixelCanvas.h.

casacore::uShort* casa::GLPixelCanvas::itsComponents_
private

Component / multi-channel buffers etc.

Definition at line 815 of file GLPixelCanvas.h.

casacore::Float casa::GLPixelCanvas::itsComponentScaleX_
private

Definition at line 817 of file GLPixelCanvas.h.

casacore::Float casa::GLPixelCanvas::itsComponentScaleY_
private

Definition at line 817 of file GLPixelCanvas.h.

casacore::uLong casa::GLPixelCanvas::itsComponentWidth_
private

Definition at line 818 of file GLPixelCanvas.h.

casacore::Float casa::GLPixelCanvas::itsComponentX_
private

Definition at line 816 of file GLPixelCanvas.h.

casacore::Float casa::GLPixelCanvas::itsComponentY_
private

Definition at line 816 of file GLPixelCanvas.h.

casacore::Float casa::GLPixelCanvas::itsComponentZ_
private

Definition at line 816 of file GLPixelCanvas.h.

Referenced by bufferZValue().

casacore::String casa::GLPixelCanvas::itsDeviceBackgroundColor_
private

Definition at line 804 of file GLPixelCanvas.h.

casacore::String casa::GLPixelCanvas::itsDeviceForegroundColor_
private

Definition at line 804 of file GLPixelCanvas.h.

Display::LineStyle casa::GLPixelCanvas::lineStyle_
private

Definition at line 810 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::listSize_
private

Display lists.

Definition at line 820 of file GLPixelCanvas.h.

GLLogIO casa::GLPixelCanvas::log_
mutableprivate

Definition at line 831 of file GLPixelCanvas.h.

Referenced by postString(), postToStream(), and postToString().

casacore::uInt casa::GLPixelCanvas::nextfree_
private

Definition at line 822 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::nspaces_
private

Definition at line 830 of file GLPixelCanvas.h.

Referenced by traceCheck().

casacore::uInt casa::GLPixelCanvas::numinuse_
private

Definition at line 821 of file GLPixelCanvas.h.

Widget casa::GLPixelCanvas::parent_
private

Definition at line 785 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::sizeincr_
private

Definition at line 823 of file GLPixelCanvas.h.

Boolean casa::GLPixelCanvas::trace_
private

Definition at line 828 of file GLPixelCanvas.h.

Referenced by trace(), and tracing().

casacore::uLong casa::GLPixelCanvas::traceLevel_
private

Definition at line 829 of file GLPixelCanvas.h.

Referenced by traceLevel().

Visual* casa::GLPixelCanvas::visual_
private

Definition at line 789 of file GLPixelCanvas.h.

XVisualInfo* casa::GLPixelCanvas::visualInfo_
private

Definition at line 788 of file GLPixelCanvas.h.

casacore::uInt casa::GLPixelCanvas::width_
private

Definition at line 798 of file GLPixelCanvas.h.


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