X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Fflag.cc;h=756b54545fd0d547a93f5d8a53f5802e41b263b0;hb=ffdf3ed01763197781a403d45c3b63f653045994;hp=d71dcca36ba5754b6e23b81e508478ac769cec67;hpb=bcd65def7da197a6f88eb1c4adb375f2b639f783;p=ardour.git diff --git a/libs/canvas/flag.cc b/libs/canvas/flag.cc index d71dcca36b..756b54545f 100644 --- a/libs/canvas/flag.cc +++ b/libs/canvas/flag.cc @@ -1,3 +1,22 @@ +/* + Copyright (C) 2011-2013 Paul Davis + Author: Carl Hetherington + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + #include "canvas/flag.h" #include "canvas/text.h" #include "canvas/rectangle.h" @@ -47,3 +66,13 @@ Flag::set_height (Distance) { _line->set (Duple (0, 0), Duple (0, _height)); } + +bool +Flag::covers (Duple const & point) const +{ + if (_rectangle) { + return _rectangle->covers (point); + } + + return false; +}