projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf293d0
)
prevent Rect::expand() from generating negative coordinates where there were none...
author
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 8 Jan 2014 23:20:19 +0000
(18:20 -0500)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 8 Jan 2014 23:20:19 +0000
(18:20 -0500)
libs/canvas/types.cc
patch
|
blob
|
history
diff --git
a/libs/canvas/types.cc
b/libs/canvas/types.cc
index 7d7a495df56666f4586a5d006b91702ec29fe530..9d8ed05622f0c8f298866113cdb085a40097a18a 100644
(file)
--- a/
libs/canvas/types.cc
+++ b/
libs/canvas/types.cc
@@
-95,8
+95,8
@@
Rect
Rect::expand (Distance amount) const
{
Rect r;
Rect::expand (Distance amount) const
{
Rect r;
- r.x0 =
x0 - amount
;
- r.y0 =
y0 - amount
;
+ r.x0 =
max (0.0, x0 - amount)
;
+ r.y0 =
max (0.0, y0 - amount)
;
r.x1 = safe_add (x1, amount);
r.y1 = safe_add (y1, amount);
return r;
r.x1 = safe_add (x1, amount);
r.y1 = safe_add (y1, amount);
return r;