}
}
- if (!text.string.empty()) {
- /* We can provide dummy values for time and frame rate here as they are only used to calculate fades */
- dcp::Size const frame = _film->frame_size();
- for (auto i: render_text(text.string, frame, dcpomatic::DCPTime(), 24)) {
- dcpomatic::Rect<double> rect (
- double(i.position.x) / frame.width, double(i.position.y) / frame.height,
- double(i.image->size().width) / frame.width, double(i.image->size().height) / frame.height
- );
- if (!_bounding_box) {
- _bounding_box = rect;
- } else {
- _bounding_box->extend (rect);
- }
+ if (text.string.empty()) {
+ return;
+ }
+
+ /* We can provide dummy values for time and frame rate here as they are only used to calculate fades */
+ dcp::Size const frame = _film->frame_size();
+ for (auto i: render_text(text.string, frame, dcpomatic::DCPTime(), 24)) {
+ dcpomatic::Rect<double> rect (
+ double(i.position.x) / frame.width, double(i.position.y) / frame.height,
+ double(i.image->size().width) / frame.width, double(i.image->size().height) / frame.height
+ );
+ if (!_bounding_box) {
+ _bounding_box = rect;
+ } else {
+ _bounding_box->extend (rect);
}
}
}