casa
5.7.0-16
|
OpenGL implementation of PixelCanvas. More...
#include <GLPixelCanvas.h>
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 GLPixelCanvasColorTable * | glpcctbl () const |
Need a mechanism to return the GLPixelCanvasColorTable so drawing functions within classes can operate. More... | |
PixelCanvasColorTable * | pcctbl () 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 > ¢res, 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... | |
Colormap * | colormap () 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 () |
GLPCDisplayList * | createList (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... | |
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... | |
OpenGL implementation of PixelCanvas.
Public interface
Implementation of PixelCanvas for OpenGL. Most, but not all of the PixelCanvas functions are available. There is very little support for 3D.
Definition at line 76 of file GLPixelCanvas.h.
casa::GLPixelCanvas::GLPixelCanvas | ( | Widget | parent, |
GLPixelCanvasColorTable * | glpcctbl, | ||
casacore::uInt | width, | ||
casacore::uInt | height | ||
) |
Caution: Drawing can not take place until the window exists!
|
virtual |
|
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_.
|
inline |
Definition at line 652 of file GLPixelCanvas.h.
References autoRefresh_, and refresh().
|
private |
Called to begin caching.
|
private |
|
virtual |
Fill one of the channel buffers.
Implements casa::PixelCanvas.
|
inline |
Definition at line 612 of file GLPixelCanvas.h.
References itsComponentZ_.
|
private |
Go through the list of display lists removing any unused lists.
|
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 |
Implements casa::PixelCanvas.
|
virtual |
(Not Cacheable) Get the current color to use for clearing the display.
Implements casa::PixelCanvas.
|
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.
|
staticprivate |
handle colorTable resize
|
virtual |
buffer memory exchanges (Not cacheable)
Implements casa::PixelCanvas.
|
virtual |
partial buffer memory exchanges.
(x1,y1 are blc, x2,y2 are trc) None of these are implemented.
Implements casa::PixelCanvas.
|
static |
buffer memory exchanges (Not cacheable)
Caution: Of this group, only swapbuffers() works;
void casa::GLPixelCanvas::copyBuffer | ( | GLenum | from, |
GLenum | to | ||
) |
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
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 |
remove list from cache
Implements casa::PixelCanvas.
|
virtual |
flush all lists from the cache
Implements casa::PixelCanvas.
|
virtual |
Return the depth of the GLPixelCanvas in bits.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
inline |
Definition at line 660 of file GLPixelCanvas.h.
References doubleBuffered_.
|
virtual |
(Cacheable) Draw a set of lines, specifying a color per line to be drawn.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Draw a set of points, specifying a color per point to be drawn.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Reimplemented from casa::PixelCanvas.
|
virtual |
Reimplemented from casa::PixelCanvas.
|
virtual |
Reimplemented from casa::PixelCanvas.
|
private |
Internal versions of public functions.
|
private |
|
private |
|
virtual |
(Cacheable) Draw and fill a closed polygon
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
(Cacheable) Draw a filled rectangle
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
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 |
(Cacheable) Draw an array of 2D color data as a raster image for zoom = <1,1>
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
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 |
(Cacheable) Draw an array of 2D color data as a raster image for any positive integer zoom
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
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 |
(Cacheable) Draw a single line using current color
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
(Cacheable) Draw N/2 lines from an Nx2 matrix
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Draw a bunch of unrelated lines using current color
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
(Cacheable) recall cached display commands
Implements casa::PixelCanvas.
|
static |
|
virtual |
(Cacheable) Draw a single point using current color
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
(Cacheable) Draw N points specified as a Nx2 matrix
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Draw a bunch of points using current color
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
void casa::GLPixelCanvas::drawPoints3D | ( | const casacore::Matrix< casacore::Float > & | verts | ) |
|
virtual |
|
virtual |
(Cacheable) Draw a closed polygon
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Draw a closed N-sided polygon from Nx2 matrix of vertices
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
|
virtual |
(Cacheable) Draw a single connected line between the given points.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
(Cacheable) Draw a rectangle
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
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 |
(Cacheable) Option Control Options listed in DisplayEnums Only Display::ClipWindow is implemented.
Implements casa::PixelCanvas.
|
virtual |
enabling/disabling of event tracking (unimplemented)
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
end caching display commands
Implements casa::PixelCanvas.
|
private |
Called to end caching.
|
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 |
Cause display to flush any graphics commands not yet drawn.
Implements casa::PixelCanvas.
|
virtual |
(NOT CACHEABLE!) Flush the component buffers.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Unimplemented get Graphics Attributes.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Not Cacheable) Retuns the current color as an RGB triple
Implements casa::PixelCanvas.
|
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 |
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 |
Get Graphics Attributes.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implemented get Graphics Attributes functions.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
virtual casacore::uInt getLineWidth() const = 0;
Implements casa::PixelCanvas.
|
virtual |
This should be removed since no one implements it.
Implements casa::PixelCanvas.
|
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 |
|
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.
|
private |
|
staticprivate |
Event Handling.
|
private |
|
virtual |
Return the height of the GLPixelCanvas in pixels.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
private |
|
inline |
Definition at line 663 of file GLPixelCanvas.h.
References isRGB_.
|
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;
|
private |
Create a new display list and add to the list of lists.
|
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.
|
inlinevirtual |
Return the pixel canvas color table.
Implements casa::PixelCanvas.
Definition at line 507 of file GLPixelCanvas.h.
References glpcctbl_.
|
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 |
Implements casa::PixelCanvas.
|
inline |
Definition at line 639 of file GLPixelCanvas.h.
References log_, and casa::GLLogIO::postString().
|
inline |
Definition at line 633 of file GLPixelCanvas.h.
References log_, and casa::GLLogIO::postToStream().
|
inline |
Definition at line 636 of file GLPixelCanvas.h.
References log_, and casa::GLLogIO::postToString().
|
private |
|
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 |
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.
|
inline |
(Not Cacheable) Redraw the window
Definition at line 399 of file GLPixelCanvas.h.
References repaint().
|
virtual |
Implements casa::PixelCanvas.
Referenced by autoRefresh().
|
virtual |
return true if refresh is allowed right now...
Reimplemented from casa::PixelCanvas.
|
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 |
(Not Cacheable) resize request.
returns true if window was resized. Will refresh if doCallbacks is true.
Reimplemented from casa::PixelCanvas.
|
virtual |
(Not Cacheable) resize the colortable by requesting a new number of cells
Implements casa::PixelCanvas.
|
virtual |
(Not Cacheable) resize the colortable by requesting a new RGB/HSV cube
Implements casa::PixelCanvas.
|
private |
Called when window is resized.
|
private |
Grow the list.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Unimplemented set graphics functions.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Set the color to use for clearing the display
Implements casa::PixelCanvas.
|
virtual |
Caution: Setting named colors for Index mode isn't implemented;
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
private |
|
private |
|
private |
|
private |
|
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 |
(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 |
(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 |
Implements casa::PixelCanvas.
|
private |
index is always treated as an index.
(In RGB mode, the virtual color table is used.
|
private |
|
private |
|
private |
|
private |
|
virtual |
Implements casa::PixelCanvas.
|
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 |
(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 |
Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
(Cacheable) Set the font to the recognizable font name.
(unimplemented)
Implements casa::PixelCanvas.
|
virtual |
Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.
Implements casa::PixelCanvas.
|
virtual |
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
virtual void setLineWidth(casacore::uInt width) = 0;
Implements casa::PixelCanvas.
|
inlinevirtual |
void casa::GLPixelCanvas::setPointSize | ( | const casacore::uInt | pointsize | ) |
(cacheable) Change the size of the points (in pixels) drawn by drawPoints.
|
virtual |
Caution: Calling setRGBColor when in Index mode ignores r, g & b and uses the current index value;
Implements casa::PixelCanvas.
|
private |
If RGB mode, index is interpreted as an index into the virtual CT.
|
private |
Store the new value in the struct.
If RGB mode, index is interpreted as a packed RGB value.
|
private |
|
private |
|
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 |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
inline |
Tracing support.
May be useful when debugging graphics code.
Turn tracing on/off.
Definition at line 619 of file GLPixelCanvas.h.
References trace_.
|
private |
Print <name> if tracing is turned on.
Most user callable drawing routines call this.
Referenced by traceCheck().
|
inlineprivate |
Definition at line 723 of file GLPixelCanvas.h.
References nspaces_, and traceCheck().
|
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_.
|
inline |
|
inline |
Definition at line 622 of file GLPixelCanvas.h.
References trace_.
|
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 |
translate all lists
Implements casa::PixelCanvas.
|
virtual |
translate the list
Implements casa::PixelCanvas.
|
private |
|
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.
|
private |
Routines to print warnings.
|
virtual |
Return the width of the GLPixelCanvas in pixels.
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
virtual |
Implements casa::PixelCanvas.
|
private |
Definition at line 832 of file GLPixelCanvas.h.
Referenced by autoRefresh().
|
private |
Definition at line 790 of file GLPixelCanvas.h.
|
private |
Definition at line 797 of file GLPixelCanvas.h.
|
private |
Clear color.
Definition at line 808 of file GLPixelCanvas.h.
|
private |
Definition at line 802 of file GLPixelCanvas.h.
|
private |
Definition at line 803 of file GLPixelCanvas.h.
|
private |
Definition at line 802 of file GLPixelCanvas.h.
|
private |
Definition at line 803 of file GLPixelCanvas.h.
|
private |
Definition at line 796 of file GLPixelCanvas.h.
|
private |
Current color.
Definition at line 806 of file GLPixelCanvas.h.
|
private |
Definition at line 826 of file GLPixelCanvas.h.
|
private |
Definition at line 824 of file GLPixelCanvas.h.
|
private |
Definition at line 800 of file GLPixelCanvas.h.
|
private |
Definition at line 784 of file GLPixelCanvas.h.
|
private |
Definition at line 825 of file GLPixelCanvas.h.
|
private |
Definition at line 801 of file GLPixelCanvas.h.
|
private |
|
private |
Definition at line 787 of file GLPixelCanvas.h.
|
private |
Definition at line 813 of file GLPixelCanvas.h.
|
private |
Definition at line 811 of file GLPixelCanvas.h.
|
private |
Definition at line 786 of file GLPixelCanvas.h.
|
private |
Definition at line 795 of file GLPixelCanvas.h.
Referenced by glpcctbl(), pcctbl(), and setPcctbl().
|
private |
Definition at line 799 of file GLPixelCanvas.h.
|
private |
Definition at line 793 of file GLPixelCanvas.h.
Referenced by isRGB().
|
private |
Definition at line 818 of file GLPixelCanvas.h.
|
private |
Component / multi-channel buffers etc.
Definition at line 815 of file GLPixelCanvas.h.
|
private |
Definition at line 817 of file GLPixelCanvas.h.
|
private |
Definition at line 817 of file GLPixelCanvas.h.
|
private |
Definition at line 818 of file GLPixelCanvas.h.
|
private |
Definition at line 816 of file GLPixelCanvas.h.
|
private |
Definition at line 816 of file GLPixelCanvas.h.
|
private |
Definition at line 816 of file GLPixelCanvas.h.
Referenced by bufferZValue().
|
private |
Definition at line 804 of file GLPixelCanvas.h.
|
private |
Definition at line 804 of file GLPixelCanvas.h.
|
private |
Definition at line 810 of file GLPixelCanvas.h.
|
private |
Display lists.
Definition at line 820 of file GLPixelCanvas.h.
|
mutableprivate |
Definition at line 831 of file GLPixelCanvas.h.
Referenced by postString(), postToStream(), and postToString().
|
private |
Definition at line 822 of file GLPixelCanvas.h.
|
private |
Definition at line 830 of file GLPixelCanvas.h.
Referenced by traceCheck().
|
private |
Definition at line 821 of file GLPixelCanvas.h.
|
private |
Definition at line 785 of file GLPixelCanvas.h.
|
private |
Definition at line 823 of file GLPixelCanvas.h.
|
private |
Definition at line 828 of file GLPixelCanvas.h.
|
private |
Definition at line 829 of file GLPixelCanvas.h.
Referenced by traceLevel().
|
private |
Definition at line 789 of file GLPixelCanvas.h.
|
private |
Definition at line 788 of file GLPixelCanvas.h.
|
private |
Definition at line 798 of file GLPixelCanvas.h.