Windows apparently has Rectangle in the global namespace.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 01:41:49 +0000 (02:41 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 01:41:49 +0000 (02:41 +0100)
src/lib/dcp_video_frame.cc
src/lib/subtitle.cc
src/lib/subtitle.h
src/lib/util.cc
src/lib/util.h
src/wx/film_viewer.cc

index bf29e6819411cf51fc645118bb0c9ea2f912bab8..24bf2173cb149aaa1c2b870eea98734f5dd6ffd7 100644 (file)
@@ -161,7 +161,7 @@ DCPVideoFrame::encode_locally ()
        shared_ptr<Image> prepared = _input->scale_and_convert_to_rgb (_out_size, _padding, _scaler);
 
        if (_subtitle) {
-               Rectangle tx = subtitle_transformed_area (
+               Rect tx = subtitle_transformed_area (
                        float (_out_size.width) / _input->size().width,
                        float (_out_size.height) / _input->size().height,
                        _subtitle->area(), _subtitle_offset, _subtitle_scale
index dcb747828a954598074619e6ecf57833aa6ffcf4..451d836913f5a07e4476d0dd3c50de29e98e9723 100644 (file)
@@ -102,13 +102,13 @@ Subtitle::Subtitle (Position p, shared_ptr<Image> i)
  *  in the coordinate space of the source.
  *  @param subtitle_scale scaling factor to apply to the subtitle image.
  */
-Rectangle
+Rect
 subtitle_transformed_area (
        float target_x_scale, float target_y_scale,
-       Rectangle sub_area, int subtitle_offset, float subtitle_scale
+       Rect sub_area, int subtitle_offset, float subtitle_scale
        )
 {
-       Rectangle tx;
+       Rect tx;
 
        sub_area.y += subtitle_offset;
 
@@ -137,8 +137,8 @@ subtitle_transformed_area (
 }
 
 /** @return area that this subtitle take up, in the original uncropped source's coordinate space */
-Rectangle
+Rect
 Subtitle::area () const
 {
-       return Rectangle (_position.x, _position.y, _image->size().width, _image->size().height);
+       return Rect (_position.x, _position.y, _image->size().width, _image->size().height);
 }
index 1cc906ce05fcc50f7987267c9572e5659b2eefa0..38ba4e70e0170fabd5e2a71ee2ad9eadceb5a2ee 100644 (file)
@@ -46,17 +46,17 @@ public:
                return _image;
        }
 
-       Rectangle area () const;
+       Rect area () const;
        
 private:
        Position _position;
        boost::shared_ptr<Image> _image;
 };
 
-Rectangle
+Rect
 subtitle_transformed_area (
        float target_x_scale, float target_y_scale,
-       Rectangle sub_area, int subtitle_offset, float subtitle_scale
+       Rect sub_area, int subtitle_offset, float subtitle_scale
        );
 
 /** A Subtitle class with details of the time over which it should be shown */
index cc201a0af4df6c6ebe169a8be6dfa489ba6b8938..dc0ee564277cde4aa444dc0fc3aae8a9ca2103c4 100644 (file)
@@ -602,13 +602,13 @@ Socket::read_indefinite (uint8_t* data, int size, int timeout)
        memcpy (data, _buffer, size);
 }
 
-Rectangle
-Rectangle::intersection (Rectangle const & other) const
+Rect
+Rect::intersection (Rect const & other) const
 {
        int const tx = max (x, other.x);
        int const ty = max (y, other.y);
        
-       return Rectangle (
+       return Rect (
                tx, ty,
                min (x + width, other.x + other.width) - tx,
                min (y + height, other.y + other.height) - ty
index da7e73f2049a6c532d0d3d91831f808129f576fc..c2706a5948b2230d0ff12fa753e336246afd35ed 100644 (file)
@@ -122,16 +122,16 @@ struct Position
 };
 
 /** A rectangle */
-struct Rectangle
+struct Rect
 {
-       Rectangle ()
+       Rect ()
                : x (0)
                , y (0)
                , width (0)
                , height (0)
        {}
 
-       Rectangle (int x_, int y_, int w_, int h_)
+       Rect (int x_, int y_, int w_, int h_)
                : x (x_)
                , y (y_)
                , width (w_)
@@ -151,7 +151,7 @@ struct Rectangle
                return Size (width, height);
        }
 
-       Rectangle intersection (Rectangle const & other) const;
+       Rect intersection (Rect const & other) const;
 };
 
 extern std::string crop_string (Position, Size);
index 6c8f38cfcdb784072cf3de2046c4a66f31ffa87a..e2ab1db5dc74bb4a2773537ccb670a61810db1b6 100644 (file)
@@ -144,7 +144,7 @@ private:
                GetSize (&vw, &vh);
 
                /* Cropped rectangle */
-               Rectangle cropped_area (
+               Rect cropped_area (
                        _film->crop().left,
                        _film->crop().top,
                        _image->GetWidth() - (_film->crop().left + _film->crop().right),
@@ -207,8 +207,8 @@ private:
                        base_area.height = base_image.GetHeight ();
                }
 
-               Rectangle base_area;
-               Rectangle transformed_area;
+               Rect base_area;
+               Rect transformed_area;
                wxImage base_image;
                wxImage transformed_image;
                shared_ptr<wxBitmap> bitmap;