summaryrefslogtreecommitdiff
path: root/src/ssa_reader.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-22 23:29:58 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-22 23:30:01 +0200
commit43d18fd59efb58004daa68f0161277efc423deef (patch)
treed76356c3d908ba4fdf76a22c9f697ff46f55133c /src/ssa_reader.h
parentaffaca1e5bc1c4dfdd7f2bd0f0dbbd9ec825b157 (diff)
Support MarginL and MarginR in SSA subtitles (DoM #2811).v1.6.49
Diffstat (limited to 'src/ssa_reader.h')
-rw-r--r--src/ssa_reader.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ssa_reader.h b/src/ssa_reader.h
index 5de660c..e8c2a52 100644
--- a/src/ssa_reader.h
+++ b/src/ssa_reader.h
@@ -44,15 +44,21 @@ public:
class Context
{
public:
- Context(int play_res_x_, int play_res_y_, Colour primary_colour_)
+ Context(int play_res_x_, int play_res_y_, Colour primary_colour_, int left_margin_ = 0, int right_margin_ = 0)
: play_res_x(play_res_x_)
, play_res_y(play_res_y_)
, primary_colour(primary_colour_)
+ , left_margin(left_margin_)
+ , right_margin(right_margin_)
{}
int play_res_x;
int play_res_y;
Colour primary_colour;
+ int left_margin;
+ int right_margin;
+
+ void update_horizontal_position(RawSubtitle& sub) const;
};
static std::vector<RawSubtitle> parse_line(RawSubtitle base, std::string line, Context const& context);