, line (0)
{}
+ /** Subtitle text in UTF-8 */
std::string text;
std::string font;
boost::optional<float> proportional;
/** in points */
boost::optional<int> points;
-
- void convert ();
} font_size;
+ float font_size_proportional (int screen_height_in_points) const;
+ int font_size_points (int screen_height_in_points) const;
+
/** vertical position of the baseline of the text */
struct {
/** as a proportion of screen height offset from some reference point */
bool bold; ///< true to use a bold version of font
bool italic; ///< true to use an italic version of font
bool underline; ///< true to underline
- int line;
+ int line; ///< line number, starting from 0
/** from time */
struct {
boost::optional<MetricTime> metric;
} from;
+ FrameTime from_frame (float frames_per_second) const;
+ MetricTime from_metric (float frames_per_second) const;
+
/** to time */
struct {
boost::optional<FrameTime> frame;
boost::optional<MetricTime> metric;
} to;
+ FrameTime to_frame (float frames_per_second) const;
+ MetricTime to_metric (float frames_per_second) const;
+
boost::optional<MetricTime> fade_up;
boost::optional<MetricTime> fade_down;
};
bool operator< (Subtitle const & a, Subtitle const & b);
-void convert_font_sizes (std::list<Subtitle> &, int screen_height_in_points);
-void convert_times (std::list<Subtitle> &, float frames_per_second);
-
}
#endif