X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsubtitle.h;h=38ba4e70e0170fabd5e2a71ee2ad9eadceb5a2ee;hb=ae118502865c95f15317716aef8d26641b9e9c3f;hp=de8f025964fc468683573813f8948ad6715d81c7;hpb=068bb5b95652c022419c64f3d29cc42c4610ae93;p=dcpomatic.git diff --git a/src/lib/subtitle.h b/src/lib/subtitle.h index de8f02596..38ba4e70e 100644 --- a/src/lib/subtitle.h +++ b/src/lib/subtitle.h @@ -17,6 +17,10 @@ */ +/** @file src/subtitle.h + * @brief Representations of subtitles. + */ + #include #include #include "util.h" @@ -24,6 +28,7 @@ struct AVSubtitle; class Image; +/** A subtitle, consisting of an image and a position */ class Subtitle { public: @@ -41,19 +46,20 @@ public: return _image; } - Rectangle area () const; + Rect area () const; private: Position _position; boost::shared_ptr _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 */ class TimedSubtitle { public: @@ -66,8 +72,8 @@ public: } private: + /** the subtitle */ boost::shared_ptr _subtitle; - /** display from time in seconds from the start of the film */ double _from; /** display to time in seconds from the start of the film */