casa
5.7.0-16
|
Base class defining interface to pixel-based output devices. More...
#include <PixelCanvas.h>
Public Member Functions | |
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 void | enableMotionEvents ()=0 |
enabling/disabling of event tracking More... | |
virtual void | disableMotionEvents ()=0 |
virtual void | enablePositionEvents ()=0 |
virtual void | disablePositionEvents ()=0 |
virtual casacore::Bool | supportsLists ()=0 |
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 ()=0 |
begin caching display commands - return list ID More... | |
virtual void | endList ()=0 |
end caching display commands More... | |
virtual void | drawList (casacore::uInt list)=0 |
(Cacheable) recall cached display commands More... | |
virtual void | translateAllLists (casacore::Int xt, casacore::Int yt)=0 |
translate all lists More... | |
virtual void | translateList (casacore::uInt list, casacore::Int xt, casacore::Int yt)=0 |
translate the list More... | |
virtual void | deleteList (casacore::uInt list)=0 |
remove list from cache More... | |
virtual void | deleteLists ()=0 |
flush all lists from the cache More... | |
virtual casacore::Bool | validList (casacore::uInt list)=0 |
return true if the list exists More... | |
virtual casacore::Bool | setFont (const casacore::String &fontName)=0 |
(Cacheable) Set the font to the recognizable font name More... | |
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 x, casacore::Int y, const casacore::String &text, Display::TextAlign alignment=Display::AlignCenter)=0 |
(Cacheable) Draw text using that font aligned in some way to the position 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 | drawImage (const casacore::Matrix< casacore::uInt > &data, casacore::Int x, casacore::Int y)=0 |
(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)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::uLong > &data, casacore::Int x, casacore::Int y)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::Float > &data, casacore::Int x, casacore::Int y)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::Double > &data, casacore::Int x, casacore::Int y)=0 |
virtual void | drawImage (const casacore::Int &, const casacore::Int &, const casacore::Matrix< casacore::uInt > &, const casacore::Matrix< casacore::Bool > &, casacore::Bool=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)=0 |
(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)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::uLong > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::Float > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::Double > &data, casacore::Int x, casacore::Int y, casacore::uInt xzoom, casacore::uInt yzoom)=0 |
virtual void | drawImage (const casacore::Matrix< casacore::uInt > &data, const casacore::Int &x, const casacore::Int &y, const Display::ColorComponent &colorcomponent)=0 |
(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)=0 |
Fill one of the channel buffers. More... | |
virtual void | flushComponentBuffers ()=0 |
(NOT CACHEABLE!) Flush the component buffers. More... | |
virtual void | drawPoint (casacore::Int x1, casacore::Int y1)=0 |
(Cacheable) Draw a single point using current color More... | |
virtual void | drawPoint (casacore::Float x1, casacore::Float y1)=0 |
virtual void | drawPoint (casacore::Double x1, casacore::Double y1)=0 |
virtual void | drawPoints (const casacore::Matrix< casacore::Int > &verts)=0 |
(Cacheable) Draw N points specified as a Nx2 matrix More... | |
virtual void | drawPoints (const casacore::Matrix< casacore::Float > &verts)=0 |
virtual void | drawPoints (const casacore::Matrix< casacore::Double > &verts)=0 |
virtual void | drawPoints (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)=0 |
(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)=0 |
virtual void | drawPoints (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)=0 |
virtual void | drawLine (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
(Cacheable) Draw a single line using current color More... | |
virtual void | drawLine (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)=0 |
virtual void | drawLine (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)=0 |
virtual void | drawLines (const casacore::Matrix< casacore::Int > &verts)=0 |
(Cacheable) Draw N/2 lines from an Nx2 matrix More... | |
virtual void | drawLines (const casacore::Matrix< casacore::Float > &verts)=0 |
virtual void | drawLines (const casacore::Matrix< casacore::Double > &verts)=0 |
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)=0 |
(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)=0 |
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)=0 |
virtual void | drawPolyline (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)=0 |
(Cacheable) Draw a single connected line between the points given More... | |
virtual void | drawPolyline (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)=0 |
virtual void | drawPolyline (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)=0 |
virtual void | drawPolyline (const casacore::Matrix< casacore::Int > &verts)=0 |
(Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices More... | |
virtual void | drawPolyline (const casacore::Matrix< casacore::Float > &verts)=0 |
virtual void | drawPolyline (const casacore::Matrix< casacore::Double > &verts)=0 |
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 | drawPolygon (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)=0 |
(Cacheable) Draw a closed polygon More... | |
virtual void | drawPolygon (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)=0 |
virtual void | drawPolygon (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)=0 |
virtual void | drawFilledPolygon (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)=0 |
(Cacheable) Draw and fill a closed polygon More... | |
virtual void | drawFilledPolygon (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)=0 |
virtual void | drawFilledPolygon (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)=0 |
virtual void | drawPolygon (const casacore::Matrix< casacore::Int > &verts)=0 |
(Cacheable) Draw a closed N-sided polygon from Nx2 matrix of vertices More... | |
virtual void | drawPolygon (const casacore::Matrix< casacore::Float > &verts)=0 |
virtual void | drawPolygon (const casacore::Matrix< casacore::Double > &verts)=0 |
virtual void | drawRectangle (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
(Cacheable) Draw a rectangle More... | |
virtual void | drawRectangle (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)=0 |
virtual void | drawRectangle (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)=0 |
virtual void | drawFilledRectangle (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
(Cacheable) Draw a filled rectangle More... | |
virtual void | drawFilledRectangle (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)=0 |
virtual void | drawFilledRectangle (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2)=0 |
virtual void | drawColoredPoints (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const casacore::Vector< casacore::uInt > &colors)=0 |
(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)=0 |
virtual void | drawColoredPoints (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const casacore::Vector< casacore::uInt > &colors)=0 |
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)=0 |
(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)=0 |
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)=0 |
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 () |
virtual void | setDrawFunction (Display::DrawFunction function)=0 |
Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums. More... | |
virtual void | setForeground (casacore::uLong color)=0 |
virtual void | setBackground (casacore::uLong color)=0 |
virtual void | setLineWidth (casacore::Float width)=0 |
virtual void setLineWidth(casacore::uInt width) = 0; More... | |
virtual void | setLineStyle (Display::LineStyle style)=0 |
virtual void | setCapStyle (Display::CapStyle style)=0 |
virtual void | setJoinStyle (Display::JoinStyle style)=0 |
virtual void | setFillStyle (Display::FillStyle style)=0 |
virtual void | setFillRule (Display::FillRule rule)=0 |
virtual void | setArcMode (Display::ArcMode mode)=0 |
virtual Display::DrawFunction | getDrawFunction () const =0 |
Get Graphics Attributes. More... | |
virtual casacore::uLong | getForeground () const =0 |
virtual casacore::uLong | getBackground () const =0 |
virtual casacore::Float | getLineWidth () const =0 |
virtual casacore::uInt getLineWidth() const = 0; More... | |
virtual Display::LineStyle | getLineStyle () const =0 |
virtual Display::CapStyle | getCapStyle () const =0 |
virtual Display::JoinStyle | getJoinStyle () const =0 |
virtual Display::FillStyle | getFillStyle () const =0 |
virtual Display::FillRule | getFillRule () const =0 |
virtual Display::ArcMode | getArcMode () const =0 |
virtual casacore::Bool | enable (Display::Option option)=0 |
(Cacheable) Option Control Options listed in DisplayEnums More... | |
virtual casacore::Bool | disable (Display::Option option)=0 |
virtual void | setImageCacheStrategy (Display::ImageCacheStrategy strategy)=0 |
Control the image-caching strategy. More... | |
virtual Display::ImageCacheStrategy | imageCacheStrategy () const =0 |
virtual void | setClipWindow (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
(Cacheable) Setup the clip window. More... | |
virtual void | getClipWindow (casacore::Int &x1, casacore::Int &y1, casacore::Int &x2, casacore::Int &y2)=0 |
void | redraw () |
(Not Cacheable) Redraw the window More... | |
virtual void | refresh (const Display::RefreshReason &reason=Display::UserCommand, const casacore::Bool &explicitrequest=true)=0 |
virtual void | flush ()=0 |
Cause display to flush any graphics commands not yet drawn. More... | |
virtual void | clear ()=0 |
(Cacheable) Clear the window using the background color More... | |
virtual void | clear (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
virtual void | setClearColor (casacore::uInt colorIndex)=0 |
(Cacheable) Set the color to use for clearing the display More... | |
virtual void | setClearColor (const casacore::String &colorname)=0 |
virtual void | setClearColor (float r, float g, float b)=0 |
virtual casacore::uInt | clearColor () const =0 |
(Not Cacheable) Get the current color to use for clearing the display. More... | |
virtual void | getClearColor (float &r, float &g, float &b) const =0 |
virtual void | setDeviceForegroundColor (const casacore::String colorname)=0 |
Get/set the current foreground/background colors. More... | |
virtual casacore::String | deviceForegroundColor () const =0 |
virtual void | setDeviceBackgroundColor (const casacore::String colorname)=0 |
virtual casacore::String | deviceBackgroundColor () const =0 |
virtual casacore::uInt | width () const =0 |
Return the width of the PixelCanvas in pixels. More... | |
virtual casacore::uInt | height () const =0 |
Return the height of the PixelCanvas in pixels. More... | |
virtual casacore::uInt | depth () const =0 |
Return the depth of the PixelCanvas in bits. More... | |
virtual void | pixelDensity (casacore::Float &xdpi, casacore::Float &ydpi) const =0 |
Get the pixel density (in dots per inch [dpi]) of the PixelCanvas. More... | |
virtual void | setColor (casacore::uInt colorIndex)=0 |
(Cacheable) Set current color (works in RGB or colormap mode) More... | |
virtual void | setColor (const casacore::String &colorname)=0 |
virtual void | setRGBColor (float r, float g, float b)=0 |
virtual void | setHSVColor (float h, float s, float v) |
virtual casacore::Bool | getColorComponents (const casacore::String &colorname, casacore::Float &r, casacore::Float &g, casacore::Float &b)=0 |
Get color components in range 0 to 1 without actually allocating the color. More... | |
virtual casacore::uInt | color () const =0 |
(Not Cacheable) Returns the current color as a color index More... | |
virtual void | getColor (float &r, float &g, float &b) const =0 |
(Not Cacheable) Retuns the current color as an RGB triple More... | |
virtual casacore::Bool | getColor (casacore::Int x, casacore::Int y, casacore::uInt &color)=0 |
(Not Cacheable) Get color index value (works in RGB or colormap mode) More... | |
virtual casacore::Bool | getRGBColor (casacore::Int x, casacore::Int y, float &r, float &g, float &b)=0 |
virtual casacore::Bool | getHSVColor (casacore::Int x, casacore::Int y, float &h, float &s, float &v) |
virtual casacore::Bool | resize (casacore::uInt, casacore::uInt, casacore::Bool=true) |
(Not Cacheable) resize request. More... | |
virtual casacore::Bool | resizeColorTable (casacore::uInt newSize)=0 |
(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)=0 |
(Not Cacheable) resize the colortable by requesting a new RGB/HSV cube More... | |
virtual PixelCanvasColorTable * | pcctbl () const =0 |
Need a mechanism to return the PixelCanvasColorTable so drawing functions within classes can operate. More... | |
virtual void | setPcctbl (PixelCanvasColorTable *pcctbl)=0 |
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... | |
virtual void | pushMatrix ()=0 |
save/restore the current translation. More... | |
virtual void | popMatrix ()=0 |
virtual void | loadIdentity ()=0 |
zero the current translation More... | |
virtual void | translate (casacore::Int xt, casacore::Int yt)=0 |
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 =0 |
virtual casacore::Int | xTranslation () const =0 |
virtual casacore::Int | yTranslation () const =0 |
Display::DrawBuffer | drawBuffer () const |
return the drawing buffer, the target destination for graphics More... | |
virtual void | setDrawBuffer (Display::DrawBuffer buf)=0 |
(Not cacheable) set the draw buffer More... | |
virtual void | copyBackBufferToFrontBuffer ()=0 |
buffer memory exchanges (Not cacheable) More... | |
virtual void | copyFrontBufferToBackBuffer ()=0 |
virtual void | swapBuffers ()=0 |
virtual void | copyBackBufferToFrontBuffer (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
partial buffer memory exchanges. More... | |
virtual void | copyFrontBufferToBackBuffer (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
virtual void | swapBuffers (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)=0 |
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::Bool | refreshAllowed () const |
return true if refresh is allowed right now... More... | |
virtual casacore::Float | pixelScaling () const |
Protected Member Functions | |
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 | |
casacore::Bool | defaultColormapActive_ |
true if the PixelCanvas was the one who registered the existing colortable More... | |
Private Member Functions | |
casacore::Matrix< casacore::Float > | getMarker (const Display::Marker &marker, const casacore::Float &pixelHeight) |
Private Attributes | |
Colormap * | colormap_ |
This is the current colormap. More... | |
Display::DrawMode | drawMode_ |
This is the current drawing mode. More... | |
Display::DrawBuffer | drawBuffer_ |
The current drawing buffer. More... | |
Display::ColorModel | colorModel_ |
The current color cube model to be used for all multichannel color mapping. More... | |
casacore::Bool | refreshActive_ |
true if refresh is active More... | |
casacore::uInt | nRegisteredColormaps_ |
Number of colormaps registered by external clients. More... | |
std::list< void * > | refreshEHList_ |
This is the list of registered refresh EventHandlers. More... | |
std::list< void * > | motionEHList_ |
This is the list of registered motion EventHandlers. More... | |
std::list< void * > | positionEHList_ |
This is the list of registered position EventHandlers. More... | |
PCVGBuffer | vgbuf_ |
The PCVGBuffer is used to accumulate lines and points until flushed (or the buffer is full) More... | |
Base class defining interface to pixel-based output devices.
PixelCanvas is the mechanism for drawing on the screen.
The philosophy of the PixelCanvas is to provide flexible fast interface to an underlying graphics system in terms of integer pixel positions and color values. The interface should be as simple as possible and not demand complicated structures on its interface.
The PixelCanvas performs minimal management, leaving up to the derived classes for most of the work required to interface to the underlying graphics library. To make it flexible, the fundamental interface accepts pointers to arrays of all the scalar AIPS++ types. The casacore::Bool type is not acceptable at the PixelCanvas level because it cannot be used to represent a color index, as are the two complex number types.
To make it fast, a caching mechanism is used to allow display lists to be created in the format native to the underlying graphics library. The caching works like OpenGL display lists.
To create a display list:
To recall the drawing commands:
To delete the list, call deleteList(), with the id
The PixelCanvas maintains a translation stack which may be driven by calls to translate and calls to pushMatrix, popMatrix.
The translation stack is an effective way to draw the same graphic in different places:
Images are most correctly drawn through the following sequence of operations
You may find that a class derived from WCDataScaleHandler, such as WCLinearScaleHandler may be useful in step #2 above.
mapToColor is also useful for transforming values that are associated with vector graphics as well (e.g., contour lines).
The PixelCanvas layer is quite thin. Most functionality is implemented in the derived classes.
Want a generic interface to possibly a variety of graphics hardware types. Want base class to maintain callback lists
see the Display test directory
Definition at line 161 of file PixelCanvas.h.
|
virtual |
|
protected |
Abstract base class idiom.
|
protected |
|
protected |
void casa::PixelCanvas::addMotionEventHandler | ( | const PCMotionEH & | eh | ) |
void casa::PixelCanvas::addPositionEventHandler | ( | const PCPositionEH & | eh | ) |
void casa::PixelCanvas::addRefreshEventHandler | ( | const PCRefreshEH & | eh | ) |
add event handlers
|
pure virtual |
Fill one of the channel buffers.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
Definition at line 520 of file PixelCanvas.h.
References casa::PCVGBuffer::accumLine(), and vgbuf_.
|
inline |
vector primitive buffering
Definition at line 517 of file PixelCanvas.h.
References casa::PCVGBuffer::accumPoint(), and vgbuf_.
|
inline |
Definition at line 526 of file PixelCanvas.h.
References casa::PCVGBuffer::accumPolygonPoint(), and vgbuf_.
|
inline |
Definition at line 523 of file PixelCanvas.h.
References casa::PCVGBuffer::accumPolylinePoint(), and vgbuf_.
void casa::PixelCanvas::callMotionEventHandlers | ( | casacore::Int | x, |
casacore::Int | y, | ||
casacore::uInt | state | ||
) |
void casa::PixelCanvas::callPositionEventHandlers | ( | Display::KeySym | keysym, |
casacore::Bool | keystate, | ||
casacore::Int | x, | ||
casacore::Int | y, | ||
casacore::uInt | state | ||
) |
void casa::PixelCanvas::callRefreshEventHandlers | ( | Display::RefreshReason | reason | ) |
call event handlers
|
pure virtual |
(Cacheable) Clear the window using the background color
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not Cacheable) Get the current color to use for clearing the display.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not Cacheable) Returns the current color as a color index
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
Definition at line 689 of file PixelCanvas.h.
References colormap_.
|
inline |
Definition at line 692 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::member(), and pcctbl().
|
inline |
return the colorModel used for multichannel color
Definition at line 853 of file PixelCanvas.h.
References colorModel_.
|
pure virtual |
buffer memory exchanges (Not cacheable)
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
partial buffer memory exchanges.
(x1,y1 are blc, x2,y2 are trc)
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
remove list from cache
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
flush all lists from the cache
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Return the depth of the PixelCanvas in bits.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
return the drawing buffer, the target destination for graphics
Definition at line 823 of file PixelCanvas.h.
References drawBuffer_.
|
virtual |
Draw a set of colored ellipses, possibly with borders.
The x and y locations must given, along with semi-major and semi-minor axes, and position angle measured in degrees positive from the x axis in a counter-clockwise direction. The size of the ellipses is globally scaled by the scale factor, and if outline
is true
, then each ellipse will have an outline in the current pen color.
|
pure virtual |
(Cacheable) Draw a set of lines, specifying a color per line to be drawn.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a set of points, specifying a color per point to be drawn.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Referenced by drawColoredPoints().
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
Reimplemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Definition at line 439 of file PixelCanvas.h.
References casacore::Matrix< T >::column(), and drawColoredPoints().
|
inlinevirtual |
Reimplemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Definition at line 443 of file PixelCanvas.h.
References casacore::Matrix< T >::column(), and drawColoredPoints().
|
inlinevirtual |
Reimplemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Definition at line 447 of file PixelCanvas.h.
References casacore::Matrix< T >::column(), and drawColoredPoints().
|
virtual |
Draw a single ellipse using the current pen (ie.
color, thickness, style). The x and y location must be given, along with the semi-major and -minor axis lengths, and the position angle measured in degrees positive from the x axis in a counter-clockwise direction. If outline is false, the ellipse is solid filled, else it is just outlined. xstretch, ystretch should be left defaulted to 1 in most cases; see usage example in WorldCanvas::drawBeamEllipse(), where they are used to stretch a beam ellipse when the display is also linearly stretched away from the aspect ratio natural to the sky projection. They multiply the relative x and y screen coordinates of ellipse points, before they are added to cx and cy. xstretch, ystretch can be negative (though smajor, sminor normally would not be).
|
pure virtual |
(Cacheable) Draw and fill a closed polygon
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a filled rectangle
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw an array of 2D color data as a raster image for zoom = <1,1>
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
(Cacheable) Draw an array of 2D color data as a raster image, taking note of the casacore::Bool
mask.
Set opaqueMask to true to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through).
Reimplemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Definition at line 271 of file PixelCanvas.h.
|
pure virtual |
(Cacheable) Draw an array of 2D color data as a raster image for any positive integer zoom
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a component of a multi-channel image, storing it in buffers until flushComponentImages() is called.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a single line using current color
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw N/2 lines from an Nx2 matrix
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a bunch of unrelated lines using current color
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) recall cached display commands
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
virtual |
Draw a "marker".
See Display for a list of available markers.
|
virtual |
|
virtual |
|
inline |
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.
This command is controlled by the caching state using newList()
Definition at line 848 of file PixelCanvas.h.
References drawMode_.
|
pure virtual |
(Cacheable) Draw a single point using current color
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw N points specified as a Nx2 matrix
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a bunch of points using current color
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a closed polygon
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a closed N-sided polygon from Nx2 matrix of vertices
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a single connected line between the points given
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw a rectangle
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Draw text using that font aligned in some way to the position
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
TODO This should become abstract - NYI in GLPixelCanvas currently Draw text at a specified angle.
Reimplemented in casa::PSPixelCanvas.
Definition at line 239 of file PixelCanvas.h.
|
pure virtual |
(Cacheable) Option Control Options listed in DisplayEnums
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
enabling/disabling of event tracking
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
end caching display commands
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Cause display to flush any graphics commands not yet drawn.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
Definition at line 529 of file PixelCanvas.h.
References casa::PCVGBuffer::flush(), and vgbuf_.
|
pure virtual |
(NOT CACHEABLE!) Flush the component buffers.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not Cacheable) Retuns the current color as an RGB triple
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not Cacheable) Get color index value (works in RGB or colormap mode)
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure 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.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
return the size of the current colormap
Definition at line 712 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::getColormapSize(), and pcctbl().
|
pure virtual |
Get Graphics Attributes.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
virtual |
Reimplemented in casa::PSPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
virtual casacore::uInt getLineWidth() const = 0;
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
private |
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Return the height of the PixelCanvas in pixels.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
zero the current translation
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigned integers in their respective array.
Tip: The choice of what type to use should be guided by the number of graphics bitplanes available; For most systems with 8-bit color, casacore::uChar is optimal; Some systems with 12 bits per pixel with an alpha channel may require using the uLong;
Warning: casacore::uChar type may not have enough bits to hold the pixel index on some high-end graphics systems
Warning: casacore::uShort type may not have enough bits to hold the pixel index on some high-end graphics systems
Definition at line 730 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 734 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 738 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 742 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
same as above except the matrix is operated on in place.
Only unsigned values make sense here.
Definition at line 751 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 754 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 757 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 760 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColor(), and pcctbl().
|
inline |
Definition at line 767 of file PixelCanvas.h.
References colormap_, casa::PixelCanvasColorTable::mapToColorRGB(), and pcctbl().
void casa::PixelCanvas::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.
These two functions accept color values from [0-1] for each channel. The colorModel is compared with the model of the PixelCanvasColorTable and is used to perform the correct mapping.
void casa::PixelCanvas::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 |
This one maps values between 0 and the integer maximum value for each channel into a single output image suitable for PixelCanvas::drawImage.
|
pure virtual |
begin caching display commands - return list ID
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Need a mechanism to return the PixelCanvasColorTable so drawing functions within classes can operate.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Referenced by colormapRegistered(), getColormapSize(), and mapToColor().
|
pure virtual |
Get the pixel density (in dots per inch [dpi]) of the PixelCanvas.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
Reimplemented in casa::PSPixelCanvas.
Definition at line 870 of file PixelCanvas.h.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
save/restore the current translation.
This is called pushMatrix because eventually we may want scaling or rotation to play a modest role here.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inline |
(Not Cacheable) Redraw the window
Definition at line 586 of file PixelCanvas.h.
References refresh().
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Referenced by redraw().
|
inline |
return true if the refresh is active (Added for X11PixelCanvas DefaultBuffer)
Definition at line 861 of file PixelCanvas.h.
References refreshActive_.
|
inlinevirtual |
return true if refresh is allowed right now...
Reimplemented in casa::GLPixelCanvas.
Definition at line 866 of file PixelCanvas.h.
void casa::PixelCanvas::registerColormap | ( | Colormap * | dcmap, |
casacore::Float | weight = 1.0 |
||
) |
register a colormap to the pixelcanvas.
Registration counts are remembered, so that map A is guaranteed to be available as long as the number of register(A)'s exceed the number of unregister(A)'s. Requests are forwarded to the PixelCanvas' PixelCanvasColorTable.
Register the cmap
Colormap on the PixelCanvas, replacing the cmapToReplace
Colormap if possible.
void casa::PixelCanvas::removeMotionEventHandler | ( | const PCMotionEH & | eh | ) |
void casa::PixelCanvas::removePositionEventHandler | ( | const PCPositionEH & | eh | ) |
void casa::PixelCanvas::removeRefreshEventHandler | ( | const PCRefreshEH & | eh | ) |
remove event handlers
|
inlinevirtual |
(Not Cacheable) resize request.
returns true if window was resized. Will refresh if doCallbacks is true.
Reimplemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
Definition at line 663 of file PixelCanvas.h.
|
pure virtual |
(Not Cacheable) resize the colortable by requesting a new number of cells
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not Cacheable) resize the colortable by requesting a new RGB/HSV cube
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Set the color to use for clearing the display
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure 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.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Set current color (works in RGB or colormap mode)
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
void casa::PixelCanvas::setColormap | ( | Colormap * | map | ) |
(Not Cacheable) set/get the current colormap.
Undefined behavior results from setting the colormap to a map that is not registered. This cannot be cached because it affects the result of getColormapSize(). Remember that once data is mapped with mapToColor, it is no longer important to worry about which colormap is active for purposes of drawing the image or vectors. colormapRegistered() can be used to determine whether the currently set colormap() is indeed registered/installed (i.e., color cells have been allocated within the pcctbl).
void casa::PixelCanvas::setColorModel | ( | Display::ColorModel | colorModel | ) |
Set the input color model for multichannel color.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure 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.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Not cacheable) set the draw buffer
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlineprotected |
Also allowed only by derived classes.
Definition at line 887 of file PixelCanvas.h.
References drawBuffer_.
|
pure virtual |
Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlineprotected |
Only allowed by derived classes.
Definition at line 882 of file PixelCanvas.h.
References drawMode_.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
(Cacheable) Set the font to the recognizable font name
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
TODO: These should become abstract Set the font via the DisplayLibrary Font class.
Reimplemented in casa::PSPixelCanvas.
Definition at line 223 of file PixelCanvas.h.
|
inlinevirtual |
Set the font to font name / size.
Reimplemented in casa::PSPixelCanvas.
Definition at line 228 of file PixelCanvas.h.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
virtual |
Reimplemented in casa::PSPixelCanvas.
|
pure virtual |
Control the image-caching strategy.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
virtual void setLineWidth(casacore::uInt width) = 0;
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure 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.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
inlinevirtual |
Definition at line 251 of file PixelCanvas.h.
|
inlinevirtual |
TODO : This should become abstract Determine the width / height of a string of text based on current settings.
Definition at line 248 of file PixelCanvas.h.
|
pure 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.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
translate all lists
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
translate the list
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
void casa::PixelCanvas::unregisterColormap | ( | Colormap * | dcmap | ) |
unregister a colormap from a pixelcanvas.
Unregistering the current map may result in undefined behavior.
|
pure virtual |
return true if the list exists
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Return the width of the PixelCanvas in pixels.
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
pure virtual |
Implemented in casa::PSPixelCanvas, and casa::GLPixelCanvas.
|
private |
This is the current colormap.
Definition at line 899 of file PixelCanvas.h.
Referenced by colormap(), colormapRegistered(), getColormapSize(), and mapToColor().
|
private |
The current color cube model to be used for all multichannel color mapping.
Definition at line 910 of file PixelCanvas.h.
Referenced by colorModel().
|
protected |
true if the PixelCanvas was the one who registered the existing colortable
Definition at line 893 of file PixelCanvas.h.
|
private |
The current drawing buffer.
Definition at line 906 of file PixelCanvas.h.
Referenced by drawBuffer(), and setDrawBuffer_().
|
private |
This is the current drawing mode.
Definition at line 903 of file PixelCanvas.h.
Referenced by drawMode(), and setDrawMode().
|
private |
This is the list of registered motion EventHandlers.
Definition at line 921 of file PixelCanvas.h.
|
private |
Number of colormaps registered by external clients.
Definition at line 916 of file PixelCanvas.h.
|
private |
This is the list of registered position EventHandlers.
Definition at line 923 of file PixelCanvas.h.
|
private |
true if refresh is active
Definition at line 913 of file PixelCanvas.h.
Referenced by refreshActive().
|
private |
This is the list of registered refresh EventHandlers.
Definition at line 919 of file PixelCanvas.h.
|
private |
The PCVGBuffer is used to accumulate lines and points until flushed (or the buffer is full)
Definition at line 927 of file PixelCanvas.h.
Referenced by bufferLine(), bufferPoint(), bufferPolygonPoint(), bufferPolylinePoint(), and flushBuffer().