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

Implementation of the PixelCanvas for PostScript devices. More...

#include <PSPixelCanvas.h>

Inheritance diagram for casa::PSPixelCanvas:
casa::PixelCanvas

Public Member Functions

 PSPixelCanvas (PSDriver *ps, PSPixelCanvasColorTable *)
 
virtual ~PSPixelCanvas ()
 
virtual void enableMotionEvents ()
 enabling/disabling of event tracking 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, const casacore::Int size)
 (Cacheable) Set the font to the PostScript font name and size. More...
 
virtual casacore::Bool setFont (DLFont *font)
 TODO: These should become abstract Set the font via the DisplayLibrary Font class. More...
 
virtual casacore::Bool setFont (const casacore::String &fontName)
 (Cacheable) Set the font to the PostScript 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 drawText (casacore::Int x, casacore::Int y, const casacore::String &text, const casacore::Float &angle, Display::TextAlign alignment=Display::AlignCenter)
 TODO This should become abstract - NYI in GLPixelCanvas currently Draw text at a specified angle. 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)
 
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)
 Draw a 2D color image with masking. 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...
 
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...
 
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 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)
 
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 drawPoints (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
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 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 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 points given More...
 
virtual void drawPolyline (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1)
 
virtual void drawPolyline (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1)
 
virtual void drawPolylines (const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1, const int close=0, const int fill=0)
 
virtual void drawPolylines (const casacore::Vector< casacore::Float > &x1, const casacore::Vector< casacore::Float > &y1, const int close=0, const int fill=0)
 
virtual void drawPolylines (const casacore::Vector< casacore::Double > &x1, const casacore::Vector< casacore::Double > &y1, const int close=0, const int fill=0)
 
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 drawPolylines (const casacore::Matrix< casacore::Int > &verts, const int close=0, const int fill=0)
 (Cacheable) Draw N-1 connected lines from Nx2 matrix of vertices More...
 
virtual void drawPolylines (const casacore::Matrix< casacore::Float > &verts, const int close=0, const int fill=0)
 
virtual void drawPolylines (const casacore::Matrix< casacore::Double > &verts, const int close=0, const int fill=0)
 
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 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 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 drawPolygon (const casacore::Matrix< casacore::Double > &verts)
 
virtual void drawRectangle (casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2, const int fill)
 (Cacheable) Draw a rectangle More...
 
virtual void drawRectangle (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2, const int fill)
 
virtual void drawRectangle (casacore::Double x1, casacore::Double y1, casacore::Double x2, casacore::Double y2, const int fill)
 
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 setDrawFunction (Display::DrawFunction function)
 Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums. More...
 
virtual void setForeground (casacore::uLong color)
 
virtual void setBackground (casacore::uLong color)
 
virtual void setLineWidth (casacore::Float width)
 virtual void setLineWidth(casacore::uInt width); More...
 
void lineWidth (casacore::Float width)
 
float lineWidth () const
 
virtual void setLineStyle (Display::LineStyle style)
 
virtual void setCapStyle (Display::CapStyle style)
 
virtual void setJoinStyle (Display::JoinStyle style)
 
virtual void setFillStyle (Display::FillStyle style)
 
virtual void setFillRule (Display::FillRule rule)
 
virtual void setArcMode (Display::ArcMode mode)
 
virtual Display::DrawFunction getDrawFunction () const
 Get Graphics Attributes. More...
 
virtual casacore::uLong getForeground () const
 
virtual casacore::uLong getBackground () const
 
virtual casacore::Float getLineWidth () const
 virtual casacore::uInt getLineWidth() const = 0; More...
 
virtual Display::LineStyle getLineStyle () const
 
virtual Display::CapStyle getCapStyle () const
 
virtual Display::JoinStyle getJoinStyle () const
 
virtual Display::FillStyle getFillStyle () 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 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)
 
virtual void refresh (const Display::RefreshReason &reason=Display::UserCommand, const casacore::Bool &explicitrequest=true)
 (Not Cacheable) Redraw the 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 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)
 
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 casacore::uInt width () const
 Return the width of the PSPixelCanvas in pixels. More...
 
virtual casacore::uInt height () const
 Return the height of the PSPixelCanvas in pixels. More...
 
virtual casacore::uInt depth () const
 Return the depth of the PSPixelCanvas in bits. More...
 
virtual void pixelDensity (casacore::Float &xdpi, casacore::Float &ydpi) const
 Get the pixel density (in dots per inch [dpi]) of the PixelCanvas. 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)
 
virtual void setHSVColor (float h, float s, float v)
 
virtual casacore::uInt color () const
 (Not Cacheable) Returns the current color as a color index 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 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::Bool getColor (casacore::Int x, casacore::Int y, casacore::uInt &color)
 (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)
 
virtual casacore::Bool getHSVColor (casacore::Int x, casacore::Int y, float &h, float &s, float &v)
 
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::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 PixelCanvasColorTablepcctbl () const
 Need a mechanism to return the PSPixelCanvasColorTable so drawing functions within classes can operate. More...
 
virtual void setPcctbl (PixelCanvasColorTable *pcctbl)
 
PSPixelCanvasColorTablePSpcctbl () const
 
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
 
virtual casacore::Int xTranslation () const
 
virtual casacore::Int yTranslation () const
 
virtual void setDrawBuffer (Display::DrawBuffer buf)
 (Not cacheable) set the draw buffer None of the buffer routines are supported. More...
 
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)
 
void drawPSImage (const int x, const int y, const int iwidth, const int iheight, const float xzoom, const float yzoom, const casacore::uShort *data, const int bpc, const Display::ColorModel=Display::Index)
 PSPixelCanvas specific misc. More...
 
void setResolution (const float xres, const float yres, const PSDriver::Dimension=PSDriver::INCHES)
 Set/get declared resolution in pixels per supplied dimension. More...
 
void getResolution (float &xres, float &yres, const PSDriver::Dimension=PSDriver::INCHES) const
 
void smooth (const casacore::Bool smth)
 Whether to enable pixel interpolation for drawImage(). More...
 
casacore::Bool smooth () const
 
casacore::Bool annotate () const
 Whether to put tracing comments in the output. More...
 
void annotate (const casacore::Bool a)
 
virtual casacore::Float pixelScaling () 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::Int textWidth (const casacore::String &)
 TODO : This should become abstract Determine the width / height of a string of text based on current settings. More...
 
virtual casacore::Int textHeight (const casacore::String &)
 
virtual void drawMarker (const casacore::Int &x1, const casacore::Int &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 Draw a "marker". More...
 
virtual void drawMarker (const casacore::Float &x1, const casacore::Float &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 
virtual void drawMarker (const casacore::Double &x1, const casacore::Double &y1, const Display::Marker &marker, const casacore::Int &pixelHeight)
 
virtual void drawEllipse (const casacore::Float &cx, const casacore::Float &cy, const casacore::Float &smajor, const casacore::Float &sminor, const casacore::Float &pangle, casacore::Bool outline=true, casacore::Float xstretch=1., casacore::Float ystretch=1.)
 Draw a single ellipse using the current pen (ie. More...
 
virtual void drawColoredEllipses (const casacore::Matrix< casacore::Float > &centres, const casacore::Vector< casacore::Float > &smajor, const casacore::Vector< casacore::Float > &sminor, const casacore::Vector< casacore::Float > &pangle, const casacore::Vector< casacore::uInt > &colors, const casacore::Float &scale=1.0, const casacore::Bool &outline=true)
 Draw a set of colored ellipses, possibly with borders. More...
 
void bufferPoint (casacore::Float x, casacore::Float y)
 vector primitive buffering More...
 
void bufferLine (casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
 
void bufferPolylinePoint (casacore::Float x, casacore::Float y)
 
void bufferPolygonPoint (casacore::Float x, casacore::Float y)
 
void flushBuffer ()
 
void redraw ()
 (Not Cacheable) Redraw the window More...
 
void setColormap (Colormap *map)
 (Not Cacheable) set/get the current colormap. More...
 
Colormapcolormap () const
 
casacore::Bool colormapRegistered ()
 
void registerColormap (Colormap *dcmap, casacore::Float weight=1.0)
 register a colormap to the pixelcanvas. More...
 
void registerColormap (Colormap *cmap, Colormap *cmapToReplace)
 Register the cmap Colormap on the PixelCanvas, replacing the cmapToReplace Colormap if possible. More...
 
void unregisterColormap (Colormap *dcmap)
 unregister a colormap from a pixelcanvas. More...
 
casacore::uInt getColormapSize () const
 return the size of the current colormap More...
 
void mapToColor (casacore::Array< casacore::uChar > &outArray, const casacore::Array< casacore::uChar > &inArray, casacore::Bool rangeCheck=false)
 map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigned integers in their respective array. More...
 
void mapToColor (casacore::Array< casacore::uShort > &outArray, const casacore::Array< casacore::uShort > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uLong > &outArray, const casacore::Array< casacore::uLong > &inArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uChar > &inOutArray, casacore::Bool rangeCheck=false)
 same as above except the matrix is operated on in place. More...
 
void mapToColor (casacore::Array< casacore::uShort > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uLong > &inOutArray, casacore::Bool rangeCheck=false)
 
void mapToColor (casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArrayRed, const casacore::Array< casacore::uInt > &inArrayGreen, const casacore::Array< casacore::uInt > &inArrayBlue)
 
void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in)
 Multi-Channel functions that combine separate array channels into a single array of output colors for use with functions that take color values. More...
 
void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Double > &chan1in, const casacore::Array< casacore::Double > &chan2in, const casacore::Array< casacore::Double > &chan3in)
 
virtual void mapToColor3 (casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::uInt > &chan1in, const casacore::Array< casacore::uInt > &chan2in, const casacore::Array< casacore::uInt > &chan3in)
 This one maps values between 0 and the integer maximum value for each channel into a single output image suitable for PixelCanvas::drawImage. More...
 
Display::DrawBuffer drawBuffer () const
 return the drawing buffer, the target destination for graphics More...
 
Display::DrawMode drawMode () const
 return the drawmode (Compile or Draw) Compile drawmode means that a display list is currently being built Draw drawmode means that drawing commands are not cached but instead are sent to the display. More...
 
Display::ColorModel colorModel () const
 return the colorModel used for multichannel color More...
 
void setColorModel (Display::ColorModel colorModel)
 Set the input color model for multichannel color. More...
 
casacore::Bool refreshActive () const
 return true if the refresh is active (Added for X11PixelCanvas DefaultBuffer) More...
 
virtual casacore::Bool refreshAllowed () const
 return true if refresh is allowed right now... More...
 

Private Member Functions

void pspcinit (PSDriver *ps, PSPixelCanvasColorTable *)
 
void clearRectangle (const float x0, const float y0, const float x1, const float y1)
 
void note (const char *)
 Used in annotating output file. More...
 
void note (const char *, const casacore::uLong)
 

Private Attributes

PSPixelCanvasColorTablepcct_
 
PSDriverps
 
float xppp_
 
float yppp_
 
float lineWidth_
 
Display::LineStyle lineStyle_
 
Display::CapStyle capStyle_
 
Display::JoinStyle joinStyle_
 
Display::FillStyle fillStyle_
 
Display::FillRule fillRule_
 
Display::ArcMode arcMode_
 
casacore::String defaultForegroundColorName_
 
casacore::String defaultBackgroundColorName_
 
casacore::uLong foreground_
 Color indexes the three colors we know about. More...
 
casacore::uLong background_
 
casacore::uLong clearColor_
 
float xt_
 
float yt_
 
float clipx0_
 
float clipy0_
 
float clipx1_
 
float clipy1_
 
casacore::Bool haveClipInfo_
 
casacore::Bool clipEnabled_
 
casacore::Bool smooth_
 
casacore::Bool annotate_
 
casacore::Float itsComponentX
 Component support. More...
 
casacore::Float itsComponentY
 
casacore::uLong itsComponentWidth
 
casacore::uLong itsComponentHeight
 
casacore::Int itsComponentBPC
 
casacore::uShortitsComponents
 

Additional Inherited Members

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

Detailed Description

Implementation of the PixelCanvas for PostScript devices.

Prerequisite

  1. PixelCanvas
  2. PSPixelCanvasColorTable
  3. PSDriver

Intended use:

Public interface

Etymology

PSPixelCanvas is a mechanism for drawing on paper.

Motivation

Synopsis

PSPixelCanvas implements PixelCanvas for PostScript output. See Example for example usage.

Example

  1. Create an output stream.
  2. Create a PSDriver choosing a page type (letter, A4, etc.). (PSDriver can take a filename as an argument instead of an ostream). See: PSDriver for more on creating PSDrivers..
  3. Create PSPixelCanvasColorTable
  4. Create PSPixelCanvas
  5. Draw something pretty.
  6. Delete everything and close the stream.
    Tip: Neither PSPixelCanvasColorTable nor PSPixelCanvas delete their PSDriver;
PSDriver *psd = new PSDriver("test.ps", PSDriver::LETTER);
PSPixelCanvasColorTable *pscct = new PSPixelCanvasColorTable(psd);
PSPixelCanvas psc = new PSPixelCanvas(psd, pscct);
... (a miracle happens).
delete psc;
delete pscct;
delete psd;


Tip: Since PostScript does not deal in in pixels, PSPixelCanvas assumes an adjustable number of pixels per inch; (Currently 1200dpi); Use the setResolution function to change this if the calling progam can't handle a 128M pixel display;

To Do

  1. Lots of 'get' functions. Some don't make sense for PostScript. Others haven't been done yet.
  2. Events.
  3. Partial support for X11 color names is hacked in. Doing it 'correctly' would require changing the constructors.
  4. No display list support.
  5. Foreground/background/clear color support is in. However, these and many other routines don't really support RGB mode yet.
  6. See: PSDriver for another list.

Definition at line 119 of file PSPixelCanvas.h.

Constructor & Destructor Documentation

casa::PSPixelCanvas::PSPixelCanvas ( PSDriver ps,
PSPixelCanvasColorTable  
)
virtual casa::PSPixelCanvas::~PSPixelCanvas ( )
virtual

Member Function Documentation

casacore::Bool casa::PSPixelCanvas::annotate ( ) const
inline

Whether to put tracing comments in the output.

Definition at line 608 of file PSPixelCanvas.h.

References annotate_.

void casa::PSPixelCanvas::annotate ( const casacore::Bool  a)
inline

Definition at line 611 of file PSPixelCanvas.h.

References annotate_.

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

Fill one of the channel buffers.

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::clear ( )
virtual

(Cacheable) Clear the window using the background color

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::clearRectangle ( const float  x0,
const float  y0,
const float  x1,
const float  y1 
)
private
virtual casacore::uInt casa::PSPixelCanvas::color ( ) const
virtual

(Not Cacheable) Returns the current color as a color index

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::copyBackBufferToFrontBuffer ( )
virtual

buffer memory exchanges (Not cacheable)

Implements casa::PixelCanvas.

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

partial buffer memory exchanges.

(x1,y1 are blc, x2,y2 are trc)

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::copyFrontBufferToBackBuffer ( )
virtual

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

remove list from cache

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::deleteLists ( )
virtual

flush all lists from the cache

Implements casa::PixelCanvas.

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

Return the depth of the PSPixelCanvas in bits.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::disableMotionEvents ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::disablePositionEvents ( )
virtual

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Reimplemented from casa::PixelCanvas.

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

Reimplemented from casa::PixelCanvas.

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

Reimplemented from casa::PixelCanvas.

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

(Cacheable) Draw and fill a closed polygon

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawFilledRectangle ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a filled rectangle

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Draw a 2D color image with masking.

(opaqueMask ignored; (unfortunately,) PSPixelcanvas always draws opaque masks).

Reimplemented from casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawLine ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a single line using current color

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawLines ( const casacore::Matrix< casacore::Int > &  verts)
virtual

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawList ( casacore::uInt  list)
virtual

(Cacheable) recall cached display commands

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawPoint ( casacore::Int  x1,
casacore::Int  y1 
)
virtual

(Cacheable) Draw a single point using current color

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawPoints ( const casacore::Matrix< casacore::Int > &  verts)
virtual

(Cacheable) Draw N points specified as a Nx2 matrix

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

(Cacheable) Draw a bunch of points using current color

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

(Cacheable) Draw a closed polygon

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Vector< casacore::Int > &  x1,
const casacore::Vector< casacore::Int > &  y1,
const int  close = 0,
const int  fill = 0 
)
virtual
virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Vector< casacore::Float > &  x1,
const casacore::Vector< casacore::Float > &  y1,
const int  close = 0,
const int  fill = 0 
)
virtual
virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Vector< casacore::Double > &  x1,
const casacore::Vector< casacore::Double > &  y1,
const int  close = 0,
const int  fill = 0 
)
virtual
virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Matrix< casacore::Int > &  verts,
const int  close = 0,
const int  fill = 0 
)
virtual

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

virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Matrix< casacore::Float > &  verts,
const int  close = 0,
const int  fill = 0 
)
virtual
virtual void casa::PSPixelCanvas::drawPolylines ( const casacore::Matrix< casacore::Double > &  verts,
const int  close = 0,
const int  fill = 0 
)
virtual
void casa::PSPixelCanvas::drawPSImage ( const int  x,
const int  y,
const int  iwidth,
const int  iheight,
const float  xzoom,
const float  yzoom,
const casacore::uShort data,
const int  bpc,
const Display::ColorModel  = Display::Index 
)

PSPixelCanvas specific misc.

functions.

Draw a scaled image on PostScript canvas.

virtual void casa::PSPixelCanvas::drawRectangle ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2,
const int  fill 
)
virtual

(Cacheable) Draw a rectangle

virtual void casa::PSPixelCanvas::drawRectangle ( casacore::Float  x1,
casacore::Float  y1,
casacore::Float  x2,
casacore::Float  y2,
const int  fill 
)
virtual
virtual void casa::PSPixelCanvas::drawRectangle ( casacore::Double  x1,
casacore::Double  y1,
casacore::Double  x2,
casacore::Double  y2,
const int  fill 
)
virtual
virtual void casa::PSPixelCanvas::drawRectangle ( casacore::Int  x1,
casacore::Int  y1,
casacore::Int  x2,
casacore::Int  y2 
)
virtual

(Cacheable) Draw a rectangle

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::drawText ( casacore::Int  ,
casacore::Int  ,
const casacore::String ,
const casacore::Float ,
Display::TextAlign  = Display::AlignCenter 
)
virtual

TODO This should become abstract - NYI in GLPixelCanvas currently Draw text at a specified angle.

Reimplemented from casa::PixelCanvas.

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

(Cacheable) Option Control Options listed in DisplayEnums

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::enableMotionEvents ( )
virtual

enabling/disabling of event tracking

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::enablePositionEvents ( )
virtual

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::endList ( )
virtual

end caching display commands

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::flush ( )
virtual

Cause display to flush any graphics commands not yet drawn.

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::flushComponentBuffers ( )
virtual

(NOT CACHEABLE!) Flush the component buffers.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

(Not Cacheable) Get color index value (works in RGB or colormap mode)

Implements casa::PixelCanvas.

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

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

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

Implements casa::PixelCanvas.

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

Get Graphics Attributes.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual casacore::Bool casa::PSPixelCanvas::getHSVColor ( casacore::Int  x,
casacore::Int  y,
float &  h,
float &  s,
float &  v 
)
virtual

Reimplemented from casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual casacore::Float casa::PSPixelCanvas::getLineWidth ( ) const
virtual
void casa::PSPixelCanvas::getResolution ( float &  xres,
float &  yres,
const PSDriver::Dimension  = PSDriver::INCHES 
) const
virtual casacore::Bool casa::PSPixelCanvas::getRGBColor ( casacore::Int  x,
casacore::Int  y,
float &  r,
float &  g,
float &  b 
)
virtual

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual casacore::uInt casa::PSPixelCanvas::height ( ) const
virtual

Return the height of the PSPixelCanvas in pixels.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::lineWidth ( casacore::Float  width)
float casa::PSPixelCanvas::lineWidth ( ) const
inline

Definition at line 395 of file PSPixelCanvas.h.

References lineWidth_.

virtual void casa::PSPixelCanvas::loadIdentity ( )
virtual

zero the current translation

Implements casa::PixelCanvas.

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

begin caching display commands - return list ID

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::note ( const char *  )
private

Used in annotating output file.

void casa::PSPixelCanvas::note ( const char *  ,
const casacore::uLong   
)
private
virtual PixelCanvasColorTable* casa::PSPixelCanvas::pcctbl ( ) const
virtual

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

Implements casa::PixelCanvas.

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

Get the pixel density (in dots per inch [dpi]) of the PixelCanvas.

Implements casa::PixelCanvas.

virtual casacore::Float casa::PSPixelCanvas::pixelScaling ( ) const
virtual

Reimplemented from casa::PixelCanvas.

virtual void casa::PSPixelCanvas::popMatrix ( )
virtual

Implements casa::PixelCanvas.

PSPixelCanvasColorTable* casa::PSPixelCanvas::PSpcctbl ( ) const
inline

Definition at line 526 of file PSPixelCanvas.h.

References pcct_.

void casa::PSPixelCanvas::pspcinit ( PSDriver ps,
PSPixelCanvasColorTable  
)
private
virtual void casa::PSPixelCanvas::pushMatrix ( )
virtual

save/restore the current translation.

This is called pushMatrix because eventually we may want scaling or rotation to play a modest role here.

Implements casa::PixelCanvas.

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

(Not Cacheable) Redraw the window

Implements casa::PixelCanvas.

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

(Not Cacheable) resize request.

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

Reimplemented from casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

(Cacheable) Setup the clip window.

The clip window, when enabled, allows a user to clip all graphics output to a rectangular region on the screen. Once set, it is only possible to REDUCE the size of the current clip window, not increase it.

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::setDeviceBackgroundColor ( const casacore::String  colorname)
virtual

Implements casa::PixelCanvas.

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

Get/set the current foreground/background colors.

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

Implements casa::PixelCanvas.

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

(Not cacheable) set the draw buffer None of the buffer routines are supported.

Implements casa::PixelCanvas.

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual casacore::Bool casa::PSPixelCanvas::setFont ( const casacore::String fontName,
const casacore::Int  size 
)
virtual

(Cacheable) Set the font to the PostScript font name and size.

Reimplemented from casa::PixelCanvas.

Referenced by setFont().

virtual casacore::Bool casa::PSPixelCanvas::setFont ( DLFont )
inlinevirtual

TODO: These should become abstract Set the font via the DisplayLibrary Font class.

Reimplemented from casa::PixelCanvas.

Definition at line 159 of file PSPixelCanvas.h.

References casa::DLFont::getPSValue(), casa::DLFont::getSize(), and setFont().

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

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::setHSVColor ( float  h,
float  s,
float  v 
)
virtual

Reimplemented from casa::PixelCanvas.

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

Control the image-caching strategy.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

virtual void setLineWidth(casacore::uInt width);

Implements casa::PixelCanvas.

virtual void casa::PSPixelCanvas::setPcctbl ( PixelCanvasColorTable pcctbl)
virtual

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::setResolution ( const float  xres,
const float  yres,
const PSDriver::Dimension  = PSDriver::INCHES 
)

Set/get declared resolution in pixels per supplied dimension.

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

Implements casa::PixelCanvas.

void casa::PSPixelCanvas::smooth ( const casacore::Bool  smth)
inline

Whether to enable pixel interpolation for drawImage().

Definition at line 599 of file PSPixelCanvas.h.

References smooth_.

casacore::Bool casa::PSPixelCanvas::smooth ( ) const
inline

Definition at line 602 of file PSPixelCanvas.h.

References smooth_.

virtual casacore::Bool casa::PSPixelCanvas::supportsLists ( )
inlinevirtual

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.

Definition at line 136 of file PSPixelCanvas.h.

virtual void casa::PSPixelCanvas::swapBuffers ( )
virtual

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

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

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

Implements casa::PixelCanvas.

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

translate all lists

Implements casa::PixelCanvas.

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

translate the list

Implements casa::PixelCanvas.

virtual casacore::Bool casa::PSPixelCanvas::validList ( casacore::uInt  list)
virtual

return true if the list exists

Implements casa::PixelCanvas.

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

Return the width of the PSPixelCanvas in pixels.

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

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

Implements casa::PixelCanvas.

Member Data Documentation

casacore::Bool casa::PSPixelCanvas::annotate_
private

Definition at line 652 of file PSPixelCanvas.h.

Referenced by annotate().

Display::ArcMode casa::PSPixelCanvas::arcMode_
private

Definition at line 642 of file PSPixelCanvas.h.

casacore::uLong casa::PSPixelCanvas::background_
private

Definition at line 646 of file PSPixelCanvas.h.

Display::CapStyle casa::PSPixelCanvas::capStyle_
private

Definition at line 638 of file PSPixelCanvas.h.

casacore::uLong casa::PSPixelCanvas::clearColor_
private

Definition at line 646 of file PSPixelCanvas.h.

casacore::Bool casa::PSPixelCanvas::clipEnabled_
private

Definition at line 650 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::clipx0_
private

Definition at line 648 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::clipx1_
private

Definition at line 648 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::clipy0_
private

Definition at line 648 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::clipy1_
private

Definition at line 648 of file PSPixelCanvas.h.

casacore::String casa::PSPixelCanvas::defaultBackgroundColorName_
private

Definition at line 644 of file PSPixelCanvas.h.

casacore::String casa::PSPixelCanvas::defaultForegroundColorName_
private

Definition at line 643 of file PSPixelCanvas.h.

Display::FillRule casa::PSPixelCanvas::fillRule_
private

Definition at line 641 of file PSPixelCanvas.h.

Display::FillStyle casa::PSPixelCanvas::fillStyle_
private

Definition at line 640 of file PSPixelCanvas.h.

casacore::uLong casa::PSPixelCanvas::foreground_
private

Color indexes the three colors we know about.

Definition at line 646 of file PSPixelCanvas.h.

casacore::Bool casa::PSPixelCanvas::haveClipInfo_
private

Definition at line 649 of file PSPixelCanvas.h.

casacore::Int casa::PSPixelCanvas::itsComponentBPC
private

Definition at line 656 of file PSPixelCanvas.h.

casacore::uLong casa::PSPixelCanvas::itsComponentHeight
private

Definition at line 655 of file PSPixelCanvas.h.

casacore::uShort* casa::PSPixelCanvas::itsComponents
private

Definition at line 657 of file PSPixelCanvas.h.

casacore::uLong casa::PSPixelCanvas::itsComponentWidth
private

Definition at line 655 of file PSPixelCanvas.h.

casacore::Float casa::PSPixelCanvas::itsComponentX
private

Component support.

Definition at line 654 of file PSPixelCanvas.h.

casacore::Float casa::PSPixelCanvas::itsComponentY
private

Definition at line 654 of file PSPixelCanvas.h.

Display::JoinStyle casa::PSPixelCanvas::joinStyle_
private

Definition at line 639 of file PSPixelCanvas.h.

Display::LineStyle casa::PSPixelCanvas::lineStyle_
private

Definition at line 637 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::lineWidth_
private

Definition at line 636 of file PSPixelCanvas.h.

Referenced by lineWidth().

PSPixelCanvasColorTable* casa::PSPixelCanvas::pcct_
private

Definition at line 633 of file PSPixelCanvas.h.

Referenced by PSpcctbl().

PSDriver* casa::PSPixelCanvas::ps
private

Definition at line 634 of file PSPixelCanvas.h.

casacore::Bool casa::PSPixelCanvas::smooth_
private

Definition at line 651 of file PSPixelCanvas.h.

Referenced by smooth().

float casa::PSPixelCanvas::xppp_
private

Definition at line 635 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::xt_
private

Definition at line 647 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::yppp_
private

Definition at line 635 of file PSPixelCanvas.h.

float casa::PSPixelCanvas::yt_
private

Definition at line 647 of file PSPixelCanvas.h.


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