diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-20 23:17:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-11-03 09:31:53 +0100 |
| commit | 5048e3e1d91858c2a4132e616438e1943f820124 (patch) | |
| tree | 5ef98efb29690e8320d4e9e36266f41e1214e174 /src/subtitle_asset_internal.h | |
| parent | 80fc63959caa039401a4d7e33bc72cd3c6ec2fe3 (diff) | |
Add Z position to subtitles; existing tests pass.
Diffstat (limited to 'src/subtitle_asset_internal.h')
| -rw-r--r-- | src/subtitle_asset_internal.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/subtitle_asset_internal.h b/src/subtitle_asset_internal.h index 55880797..7fe142fc 100644 --- a/src/subtitle_asset_internal.h +++ b/src/subtitle_asset_internal.h @@ -144,12 +144,13 @@ private: class Text : public Part { public: - Text (std::shared_ptr<Part> parent, HAlign h_align, float h_position, VAlign v_align, float v_position, Direction direction) + Text (std::shared_ptr<Part> parent, HAlign h_align, float h_position, VAlign v_align, float v_position, float z_position, Direction direction) : Part (parent) , _h_align (h_align) , _h_position (h_position) , _v_align (v_align) , _v_position (v_position) + , _z_position(z_position) , _direction (direction) {} @@ -160,6 +161,7 @@ private: float _h_position; VAlign _v_align; float _v_position; + float _z_position; Direction _direction; }; @@ -188,7 +190,7 @@ private: class Image : public Part { public: - Image (std::shared_ptr<Part> parent, std::string id, ArrayData png_data, HAlign h_align, float h_position, VAlign v_align, float v_position) + Image (std::shared_ptr<Part> parent, std::string id, ArrayData png_data, HAlign h_align, float h_position, VAlign v_align, float v_position, float z_position) : Part (parent) , _png_data (png_data) , _id (id) @@ -196,6 +198,7 @@ public: , _h_position (h_position) , _v_align (v_align) , _v_position (v_position) + , _z_position(z_position) {} xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const override; @@ -207,6 +210,7 @@ private: float _h_position; VAlign _v_align; float _v_position; + float _z_position; }; |
