40 #ifndef LIBDCP_SUBTITLE_ASSET_INTERNAL_H
41 #define LIBDCP_SUBTITLE_ASSET_INTERNAL_H
49 LIBDCP_DISABLE_WARNINGS
50 #include <libxml++/libxml++.h>
51 LIBDCP_ENABLE_WARNINGS
54 struct take_intersection_test;
55 struct take_difference_test;
56 struct pull_fonts_test1;
57 struct pull_fonts_test2;
58 struct pull_fonts_test3;
83 Font (std::shared_ptr<SubtitleString> s, Standard standard);
85 xmlpp::Element* as_xml (xmlpp::Element* parent,
Context& context)
const;
91 bool operator== (
Font const & other)
const;
94 friend struct ::take_intersection_test;
95 friend struct ::take_difference_test;
96 friend struct ::pull_fonts_test1;
97 friend struct ::pull_fonts_test2;
98 friend struct ::pull_fonts_test3;
100 std::map<std::string, std::string> _values;
107 Part (std::shared_ptr<Part> parent_)
111 Part (std::shared_ptr<Part> parent_,
Font font_)
118 virtual xmlpp::Element* as_xml (xmlpp::Element* parent,
Context &)
const;
119 void write_xml (xmlpp::Element* parent,
order::Context& context)
const;
121 std::shared_ptr<Part> parent;
123 std::vector<std::shared_ptr<Part>> children;
130 String (std::shared_ptr<Part> parent,
Font font, std::string text,
float space_before)
131 :
Part (parent, font)
133 , _space_before (space_before)
136 virtual xmlpp::Element* as_xml (xmlpp::Element* parent,
Context &)
const override;
147 Text (std::shared_ptr<Part> parent,
HAlign h_align,
float h_position,
VAlign v_align,
float v_position,
Direction direction)
150 , _h_position (h_position)
152 , _v_position (v_position)
153 , _direction (direction)
156 xmlpp::Element* as_xml (xmlpp::Element* parent,
Context& context)
const override;
175 , _fade_down (fade_down)
178 xmlpp::Element* as_xml (xmlpp::Element* parent,
Context& context)
const override;
191 Image (std::shared_ptr<Part> parent, std::string
id,
ArrayData png_data,
HAlign h_align,
float h_position,
VAlign v_align,
float v_position)
193 , _png_data (png_data)
196 , _h_position (h_position)
198 , _v_position (v_position)
201 xmlpp::Element* as_xml (xmlpp::Element* parent,
Context& context)
const override;
Class to hold an arbitrary block of data.
A representation of time within a DCP.
void take_difference(Font other)
void take_intersection(Font other)
std::string _id
the ID of this image
Namespace for everything in libdcp.
Methods for conversion to/from string.