Source
xxxxxxxxxx
//# SimplePlotter.cc: Concrete plotting class for common or simple use cases.
//# Copyright (C) 2008
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id: $
using namespace casacore;
namespace casa {
///////////////////////////////
// SIMPLEPLOTTER DEFINITIONS //
///////////////////////////////
// Constructors/Destructors //
SimplePlotter::SimplePlotter(PlotFactoryPtr factory): m_factory(factory) {
if(!m_factory.null()) {
m_plotter = m_factory->plotter();
m_canvas = m_plotter->canvas();
m_mouseTools = m_canvas->standardMouseTools();
// Set up defaults
m_line = factory->line("black", PlotLine::SOLID, 1.0);
m_symbol = factory->symbol(PlotSymbol::DIAMOND);
m_symbol->setLine(m_line);
m_symbol->setAreaFill("blue");
m_areaFill = factory->areaFill("black", PlotAreaFill::MESH3);
} else {
String error = "SimplePlotter::SimplePlotter(): Invalid plotter "
"implementation. If you're trying to use qwt, make"
" sure you have the library installed and the "
"AIPS_HAS_QWT compiler flag turned on.";
throw error;
}
}
SimplePlotter::~SimplePlotter() { }