A single line of subtitle text with all the associated attributes.
More...
#include <subtitle_string.h>
|
| SubtitleString (boost::optional< std::string > font, bool italic, bool bold, bool underline, Colour colour, int size, float aspect_adjust, Time in, Time out, float h_position, HAlign h_align, float v_position, VAlign v_align, Direction direction, std::string text, Effect effect, Colour effect_colour, Time fade_up_time, Time fade_down_time, float space_before) |
|
boost::optional< std::string > | font () const |
|
bool | italic () const |
|
bool | bold () const |
|
bool | underline () const |
|
Colour | colour () const |
|
std::string | text () const |
|
Direction | direction () const |
|
Effect | effect () const |
|
Colour | effect_colour () const |
|
int | size () const |
|
int | size_in_pixels (int screen_height) const |
|
float | space_before () const |
|
float | aspect_adjust () const |
|
void | set_font (std::string id) |
|
void | unset_font () |
|
void | set_size (int s) |
|
void | set_aspect_adjust (float a) |
|
void | set_text (std::string t) |
|
void | set_colour (Colour c) |
|
void | set_effect (Effect e) |
|
void | set_effect_colour (Colour c) |
|
Time | in () const |
|
Time | out () const |
|
float | h_position () const |
|
HAlign | h_align () const |
|
float | v_position () const |
|
VAlign | v_align () const |
|
Time | fade_up_time () const |
|
Time | fade_down_time () const |
|
void | set_in (Time i) |
|
void | set_out (Time o) |
|
void | set_h_position (float p) |
|
void | set_v_position (float p) |
|
void | set_fade_up_time (Time t) |
|
void | set_fade_down_time (Time t) |
|
A single line of subtitle text with all the associated attributes.
Definition at line 57 of file subtitle_string.h.
◆ SubtitleString()
SubtitleString::SubtitleString |
( |
boost::optional< std::string > |
font, |
|
|
bool |
italic, |
|
|
bool |
bold, |
|
|
bool |
underline, |
|
|
Colour |
colour, |
|
|
int |
size, |
|
|
float |
aspect_adjust, |
|
|
Time |
in, |
|
|
Time |
out, |
|
|
float |
h_position, |
|
|
HAlign |
h_align, |
|
|
float |
v_position, |
|
|
VAlign |
v_align, |
|
|
Direction |
direction, |
|
|
std::string |
text, |
|
|
Effect |
effect, |
|
|
Colour |
effect_colour, |
|
|
Time |
fade_up_time, |
|
|
Time |
fade_down_time, |
|
|
float |
space_before |
|
) |
| |
- Parameters
-
font | Font ID, or empty to use the default |
italic | true for italic text |
bold | true for bold text |
underline | true for underlined text |
colour | Colour of the text |
size | Size in points as if the screen height is 11 inches, so a 72pt font would be 1/11th of the screen height |
aspect_adjust | greater than 1 to stretch text to be wider, less than 1 to shrink text to be narrower (must be between 0.25 and 4) |
in | start time |
out | finish time |
h_position | Horizontal position as a fraction of the screen width (between 0 and 1) from h_align |
h_align | Horizontal alignment point |
v_position | Vertical position as a fraction of the screen height (between 0 and 1) from v_align |
v_align | Vertical alignment point |
direction | Direction of text |
text | The text to display |
effect | Effect to use |
effect_colour | Colour of the effect |
fade_up_time | Time to fade the text in |
fade_down_time | Time to fade the text out |
space_before | Space to add before this string, in ems (could be negative to remove space). |
Definition at line 53 of file subtitle_string.cc.
◆ aspect_adjust()
float dcp::SubtitleString::aspect_adjust |
( |
| ) |
const |
|
inline |
- Returns
- Aspect ratio ‘adjustment’ of the font size. Values greater than 1 widen each character, values less than 1 narrow each character, and the value must be between 0.25 and 4.
Definition at line 155 of file subtitle_string.h.
◆ font()
boost::optional<std::string> dcp::SubtitleString::font |
( |
| ) |
const |
|
inline |
◆ _bold
bool dcp::SubtitleString::_bold |
|
private |
◆ _colour
Colour dcp::SubtitleString::_colour |
|
private |
◆ _font
boost::optional<std::string> dcp::SubtitleString::_font |
|
private |
◆ _italic
bool dcp::SubtitleString::_italic |
|
private |
◆ _size
int dcp::SubtitleString::_size |
|
private |
Size in points as if the screen height is 11 inches, so a 72pt font would be 1/11th of the screen height.
Definition at line 205 of file subtitle_string.h.
◆ _underline
bool dcp::SubtitleString::_underline |
|
private |
The documentation for this class was generated from the following files: