1 #ifndef _rendertext_hpp_included_
2 #define _rendertext_hpp_included_
6 #include "yuv4mpeg.hpp"
9 struct text_render_parameters
11 text_render_parameters();
14 signed text_alignment
;
15 unsigned text_spacing
;
20 signed halo_thickness
;
21 bool argument(const std::string
& arg
);
22 parsed_png
& render(const std::string
& str
);
23 std::pair
<size_t, size_t> render_size(const std::string
& str
);
41 subtitle(const pre_subtitle
& presub
, const yuv4mpeg_stream_header
& strmh
);
54 static std::vector
<subtitle
*> from_presub(const std::vector
<pre_subtitle
*>& presubs
,
55 const yuv4mpeg_stream_header
& strmh
);
56 void stamp(uint8_t* data
, size_t iwidth
, size_t iheight
, uint64_t frameno
) const;
59 struct subtitle_render_context
61 subtitle_render_context();
62 text_render_parameters tparams
;
68 bool argument(const std::string
& arg
, pre_subtitle
*& presub
);
69 bool argument(const std::string
& arg
, std::vector
<pre_subtitle
*>& presubs
)
71 pre_subtitle
* presub
= NULL
;
72 bool ret
= argument(arg
, presub
);
74 presubs
.push_back(presub
);