2013-04-15 22:10:18 -04:00
|
|
|
/*
|
2019-08-03 04:40:09 +02:00
|
|
|
* Copyright (C) 2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
|
* Copyright (C) 2013-2014 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
|
* Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*/
|
2013-04-15 22:10:18 -04:00
|
|
|
|
2013-04-04 00:32:52 -04:00
|
|
|
#ifndef __CANVAS_OUTLINE_H__
|
|
|
|
|
#define __CANVAS_OUTLINE_H__
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2013-12-27 16:24:58 -05:00
|
|
|
|
2014-06-12 14:53:44 -04:00
|
|
|
#include <boost/noncopyable.hpp>
|
|
|
|
|
|
2013-12-27 16:24:58 -05:00
|
|
|
#include "canvas/visibility.h"
|
2013-04-04 00:32:52 -04:00
|
|
|
#include "canvas/types.h"
|
|
|
|
|
|
|
|
|
|
namespace ArdourCanvas {
|
|
|
|
|
|
2014-06-12 14:53:44 -04:00
|
|
|
class Item;
|
|
|
|
|
|
|
|
|
|
class LIBCANVAS_API Outline : public boost::noncopyable
|
2013-04-04 00:32:52 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2014-06-12 14:53:44 -04:00
|
|
|
Outline (Item& self);
|
|
|
|
|
virtual ~Outline() {}
|
2013-04-04 00:32:52 -04:00
|
|
|
|
2017-07-17 18:34:35 +02:00
|
|
|
Gtkmm2ext::Color outline_color () const {
|
2013-04-04 00:32:52 -04:00
|
|
|
return _outline_color;
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-17 18:34:35 +02:00
|
|
|
virtual void set_outline_color (Gtkmm2ext::Color);
|
2013-04-04 00:32:52 -04:00
|
|
|
|
|
|
|
|
Distance outline_width () const {
|
|
|
|
|
return _outline_width;
|
|
|
|
|
}
|
2015-10-05 16:17:49 +02:00
|
|
|
|
2013-04-04 00:32:52 -04:00
|
|
|
virtual void set_outline_width (Distance);
|
|
|
|
|
|
|
|
|
|
bool outline () const {
|
|
|
|
|
return _outline;
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-16 20:38:10 -04:00
|
|
|
virtual void set_outline (bool);
|
2013-04-04 00:32:52 -04:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
void setup_outline_context (Cairo::RefPtr<Cairo::Context>) const;
|
2014-06-12 14:53:44 -04:00
|
|
|
|
2017-07-17 18:34:35 +02:00
|
|
|
Item& _self;
|
|
|
|
|
Gtkmm2ext::Color _outline_color;
|
|
|
|
|
Distance _outline_width;
|
|
|
|
|
bool _outline;
|
2013-04-04 00:32:52 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|