summaryrefslogtreecommitdiff
path: root/libs/canvas/types.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/canvas/types.cc')
-rw-r--r--libs/canvas/types.cc37
1 files changed, 2 insertions, 35 deletions
diff --git a/libs/canvas/types.cc b/libs/canvas/types.cc
index a8c690bbbe..9d8ed05622 100644
--- a/libs/canvas/types.cc
+++ b/libs/canvas/types.cc
@@ -95,8 +95,8 @@ Rect
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;
@@ -121,39 +121,6 @@ Rect::fix () const
return r;
}
-Rect
-Rect::convert_to_device (Cairo::RefPtr<Cairo::Context> c) const
-{
- Coord xa, ya, xb, yb;
-
- xa = x0;
- xb = x1;
- ya = y0;
- yb = y1;
-
- c->user_to_device (xa, ya);
- c->user_to_device (xb, yb);
-
- return Rect (xa, ya, xb, yb);
-}
-
-
-Rect
-Rect::convert_to_user (Cairo::RefPtr<Cairo::Context> c) const
-{
- Coord xa, ya, xb, yb;
-
- xa = x0;
- xb = x1;
- ya = y0;
- yb = y1;
-
- c->device_to_user (xa, ya);
- c->device_to_user (xb, yb);
-
- return Rect (xa, ya, xb, yb);
-}
-
Duple
ArdourCanvas::operator- (Duple const & o)
{