summaryrefslogtreecommitdiff
path: root/src/subtitle.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-25 21:25:33 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-25 21:25:33 +0100
commit8181d97d7f9ef0d44af748a5bd5666cf575955fe (patch)
treed27502e2c9e1acf554796d94987620804d5a25c9 /src/subtitle.h
parentb5dc08b66bc7e2340dd5a8a0156036a65a49f269 (diff)
Change API for alternate representations of time / font size etc. Fix Arial recognition.
Diffstat (limited to 'src/subtitle.h')
-rw-r--r--src/subtitle.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/subtitle.h b/src/subtitle.h
index 7729064..70a8eb6 100644
--- a/src/subtitle.h
+++ b/src/subtitle.h
@@ -53,6 +53,9 @@ public:
boost::optional<int> points;
} 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 */
@@ -76,21 +79,24 @@ public:
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