28 #ifndef TRIALDISPLAY_PSPIXELCANVAS_H
29 #define TRIALDISPLAY_PSPIXELCANVAS_H
272 const int close=0,
const int fill=0);
275 const int close=0,
const int fill=0);
278 const int close=0,
const int fill=0);
291 const int close=0,
const int fill=0);
293 const int close=0,
const int fill=0);
295 const int close=0,
const int fill=0);
450 virtual void flush();
454 virtual void clear();
467 virtual void getClearColor(
float &r,
float &g,
float &b)
const;
483 virtual void setRGBColor(
float r,
float g,
float b);
484 virtual void setHSVColor(
float h,
float s,
float v);
491 virtual void getColor(
float &r,
float &g,
float &b)
const;
586 const int iwidth,
const int iheight,
587 const float xzoom,
const float yzoom,
626 const float x1,
const float y1);
629 void note(
const char *);
void annotate(const casacore::Bool a)
virtual void refresh(const Display::RefreshReason &reason=Display::UserCommand, const casacore::Bool &explicitrequest=true)
(Not Cacheable) Redraw the window
virtual void drawFilledRectangle(casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
(Cacheable) Draw a filled rectangle
Display::FillRule fillRule_
A class designed to manage several representations of the same font.
virtual casacore::uInt newList()
begin caching display commands - return list ID
virtual void enableMotionEvents()
enabling/disabling of event tracking
virtual Display::ImageCacheStrategy imageCacheStrategy() const
Abstract interface to underlying graphics library's colortable.
virtual casacore::uInt depth() const
Return the depth of the PSPixelCanvas in bits.
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>
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
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.
virtual void setBackground(casacore::uLong color)
virtual void setRGBColor(float r, float g, float b)
virtual void swapBuffers()
casacore::Bool clipEnabled_
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
virtual void getColor(float &r, float &g, float &b) const
(Not Cacheable) Retuns the current color as an RGB triple
virtual void copyBackBufferToFrontBuffer()
buffer memory exchanges (Not cacheable)
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.
virtual casacore::Bool validList(casacore::uInt list)
return true if the list exists
virtual casacore::uLong getBackground() const
virtual void disablePositionEvents()
virtual casacore::uInt width() const
Return the width of the PSPixelCanvas in pixels.
virtual void setJoinStyle(Display::JoinStyle style)
Low level interface between PSPixelCanvas{ColorTable} and PostScript.
virtual void setCapStyle(Display::CapStyle style)
virtual void setClipWindow(casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
(Cacheable) Setup the clip window.
Option
PixelCanvas Options.
virtual void setImageCacheStrategy(Display::ImageCacheStrategy strategy)
Control the image-caching strategy.
virtual casacore::Int yTranslation() const
virtual Display::LineStyle getLineStyle() const
virtual void translateList(casacore::uInt list, casacore::Int xt, casacore::Int yt)
translate the list
casacore::Float itsComponentY
virtual void setColor(casacore::uInt colorIndex)
(Cacheable) Set current color (works in RGB or colormap mode)
virtual casacore::uInt clearColor() const
(Not Cacheable) Get the current color to use for clearing the display.
virtual PixelCanvasColorTable * pcctbl() const
Need a mechanism to return the PSPixelCanvasColorTable so drawing functions within classes can operat...
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.
DrawBuffer
PixelCanvas target drawing destination.
virtual void setDrawBuffer(Display::DrawBuffer buf)
(Not cacheable) set the draw buffer None of the buffer routines are supported.
void clearRectangle(const float x0, const float y0, const float x1, const float y1)
void note(const char *)
Used in annotating output file.
virtual void translateAllLists(casacore::Int xt, casacore::Int yt)
translate all lists
FillRule
Fill Rule Xlib programming guide, pg.132.
Display::FillStyle fillStyle_
virtual void setDeviceBackgroundColor(const casacore::String colorname)
void pspcinit(PSDriver *ps, PSPixelCanvasColorTable *)
casacore::uLong itsComponentHeight
casacore::uLong background_
virtual void setLineStyle(Display::LineStyle style)
virtual void copyFrontBufferToBackBuffer()
Implementation of the PixelCanvas for PostScript devices.
casacore::Int getSize()
Return the current font as a post-script recognisable name casacore::String getPSValueNoSize();.
Base class defining interface to pixel-based output devices.
virtual casacore::Float pixelScaling() const
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual casacore::Bool setFont(DLFont *font)
TODO: These should become abstract Set the font via the DisplayLibrary Font class.
CapStyle
Controls the appearance of thick lines near their endpoints.
reference point aligned to center of text
virtual void setFillRule(Display::FillRule rule)
virtual void drawLines(const casacore::Matrix< casacore::Int > &verts)
(Cacheable) Draw N/2 lines from an Nx2 matrix
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 drawList(casacore::uInt list)
(Cacheable) recall cached display commands
ColorComponent
Color components.
virtual void setArcMode(Display::ArcMode mode)
virtual void setClearColor(casacore::uInt colorIndex)
(Cacheable) Set the color to use for clearing the display
Display::LineStyle lineStyle_
casacore::Bool annotate() const
Whether to put tracing comments in the output.
virtual void getTranslation(casacore::Int &xt, casacore::Int &yt) const
virtual void flush()
Cause display to flush any graphics commands not yet drawn.
virtual casacore::Bool supportsLists()
Does this canvas support cached display lists? The user of the canvas should always check this...
virtual void drawFilledPolygon(const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
(Cacheable) Draw and fill a closed polygon
casacore::uShort * itsComponents
virtual void loadIdentity()
zero the current translation
PSPixelCanvasColorTable * PSpcctbl() const
virtual Display::FillStyle getFillStyle() const
virtual void setDeviceForegroundColor(const casacore::String colorname)
Get/set the current foreground/background colors.
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.
virtual Display::JoinStyle getJoinStyle() const
bool Bool
Define the standard types used by Casacore.
virtual void drawLine(casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2)
(Cacheable) Draw a single line using current color
virtual casacore::Bool setFont(const casacore::String &fontName, const casacore::Int size)
(Cacheable) Set the font to the PostScript font name and size.
virtual void getClipWindow(casacore::Int &x1, casacore::Int &y1, casacore::Int &x2, casacore::Int &y2)
virtual void enablePositionEvents()
void smooth(const casacore::Bool smth)
Whether to enable pixel interpolation for drawImage().
virtual void pixelDensity(casacore::Float &xdpi, casacore::Float &ydpi) const
Get the pixel density (in dots per inch [dpi]) of the PixelCanvas.
Display::ArcMode arcMode_
void flushComponentBuffers()
(NOT CACHEABLE!) Flush the component buffers.
virtual casacore::uInt height() const
Return the height of the PSPixelCanvas in pixels.
Display::CapStyle capStyle_
virtual casacore::String deviceBackgroundColor() const
virtual casacore::Int xTranslation() const
casacore::Float itsComponentX
Component support.
virtual void setDrawFunction(Display::DrawFunction function)
Set Graphics Attributes Options for functions with enum argument listed in DisplayEnums.
virtual void drawPolygon(const casacore::Vector< casacore::Int > &x1, const casacore::Vector< casacore::Int > &y1)
(Cacheable) Draw a closed polygon
virtual casacore::Bool resizeColorTable(casacore::uInt newSize)
(Not Cacheable) resize the colortable by requesting a new number of cells
void setResolution(const float xres, const float yres, const PSDriver::Dimension=PSDriver::INCHES)
Set/get declared resolution in pixels per supplied dimension.
virtual void clear()
(Cacheable) Clear the window using the background color
casacore::Bool haveClipInfo_
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
FillStyle
Controls fill style.
virtual Display::DrawFunction getDrawFunction() const
Get Graphics Attributes.
Display::JoinStyle joinStyle_
casacore::uLong foreground_
Color indexes the three colors we know about.
RefreshReason
Callback reasons for PCRefreshEvent and WCRefreshEvent.
virtual void pushMatrix()
save/restore the current translation.
virtual void setHSVColor(float h, float s, float v)
virtual void deleteList(casacore::uInt list)
remove list from cache
PSPixelCanvasColorTable * pcct_
casacore::uLong itsComponentWidth
virtual void drawPoints(const casacore::Matrix< casacore::Int > &verts)
(Cacheable) Draw N points specified as a Nx2 matrix
virtual void setPcctbl(PixelCanvasColorTable *pcctbl)
virtual Display::ArcMode getArcMode() const
virtual void disableMotionEvents()
casacore::Bool smooth() const
virtual casacore::Bool enable(Display::Option option)
(Cacheable) Option Control Options listed in DisplayEnums
String: the storage and methods of handling collections of characters.
virtual void drawRectangle(casacore::Int x1, casacore::Int y1, casacore::Int x2, casacore::Int y2, const int fill)
(Cacheable) Draw a rectangle
virtual casacore::uInt color() const
(Not Cacheable) Returns the current color as a color index
virtual void drawPoint(casacore::Int x1, casacore::Int y1)
(Cacheable) Draw a single point using current color
virtual void setFillStyle(Display::FillStyle style)
virtual void getClearColor(float &r, float &g, float &b) const
ImageCacheStrategy
How to cache images when displaying them on client-server graphics systems.
void getResolution(float &xres, float &yres, const PSDriver::Dimension=PSDriver::INCHES) const
virtual void setForeground(casacore::uLong color)
DrawFunction
PixelCanvas Drawing Logical Functions.
virtual void setLineWidth(casacore::Float width)
virtual void setLineWidth(casacore::uInt width);
casacore::uLong clearColor_
virtual casacore::String deviceForegroundColor() const
virtual void translate(casacore::Int xt, casacore::Int yt)
translation functions translate applies a relative translation to the current matrix and can be used ...
virtual void deleteLists()
flush all lists from the cache
virtual casacore::Bool getHSVColor(casacore::Int x, casacore::Int y, float &h, float &s, float &v)
casacore::String defaultBackgroundColorName_
PSPixelCanvas(PSDriver *ps, PSPixelCanvasColorTable *)
virtual casacore::Bool disable(Display::Option option)
JoinStyle
Controls the appearance of two joined lines.
Implementation of PixelCanvasColorTable for PostScript device.
casacore::String getPSValue()
Return the current font as a PS recognisable name, with the specific size 'tagged onto' the end of it...
virtual void endList()
end caching display commands
virtual casacore::Float getLineWidth() const
virtual casacore::uInt getLineWidth() const = 0;
ColorModel
Different ways of handling color on the display.
virtual casacore::Bool resize(casacore::uInt reqXSize, casacore::uInt reqYSize, casacore::Bool doCallbacks=true)
(Not Cacheable) resize request.
casacore::String defaultForegroundColorName_
User told PixelCanvas to refresh via PixelCanvas refresh()
virtual Display::CapStyle getCapStyle() const
casacore::Int itsComponentBPC
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.
virtual casacore::uLong getForeground() const
LineStyle
Style of line to use.
virtual Display::FillRule getFillRule() const
virtual casacore::Bool getRGBColor(casacore::Int x, casacore::Int y, float &r, float &g, float &b)