projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d43d2e
)
add variant of Rect::expand() that allows different amounts in each direction
author
Paul Davis
<paul@linuxaudiosystems.com>
Sun, 25 Sep 2016 19:45:39 +0000
(14:45 -0500)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Tue, 27 Sep 2016 19:59:32 +0000
(14:59 -0500)
libs/canvas/canvas/types.h
patch
|
blob
|
history
diff --git
a/libs/canvas/canvas/types.h
b/libs/canvas/canvas/types.h
index a92d637925a93365e981714d574d5a7b98f71385..d0fecf1fda0279bd412caff4af543d4de0e036ab 100644
(file)
--- a/
libs/canvas/canvas/types.h
+++ b/
libs/canvas/canvas/types.h
@@
-31,7
+31,7
@@
#include "canvas/visibility.h"
namespace Cairo {
- class Context;
+ class Context;
}
namespace ArdourCanvas
@@
-141,6
+141,11
@@
struct LIBCANVAS_API Rect
canvas_safe_add (x1, amount),
canvas_safe_add (y1, amount));
}
+ Rect expand (Distance top, Distance right, Distance bottom, Distance left) const throw () {
+ return Rect (x0 - left, y0 - top,
+ canvas_safe_add (x1, right),
+ canvas_safe_add (y1, bottom));
+ }
Rect shrink (Distance amount) const throw () {
/* This isn't the equivalent of expand (-distance) because