remove unused code
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Jan 2014 15:31:39 +0000 (10:31 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Jan 2014 15:31:39 +0000 (10:31 -0500)
libs/canvas/canvas/types.h
libs/canvas/types.cc

index 77c148f3a08770709cf68bebf3cceaa5b31226cf..1e8b7b145f9e203010d99b48e39b315f638b9e2f 100644 (file)
@@ -95,9 +95,7 @@ struct LIBCANVAS_API Rect
        Rect expand (Distance) const;
        bool contains (Duple) const;
        Rect fix () const;
-
-        Rect convert_to_device (Cairo::RefPtr<Cairo::Context>) const;
-        Rect convert_to_user (Cairo::RefPtr<Cairo::Context>) const;
+       bool empty() const { return (x0 == x1 && y0 == y1); }
 
        Distance width () const {
                return x1 - x0;
index a8c690bbbe85e2a9bea8cbc7af143f82a3cb0807..7d7a495df56666f4586a5d006b91702ec29fe530 100644 (file)
@@ -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)
 {