shared_ptr<Image> prepared = _input->scale_and_convert_to_rgb (_out_size, _padding, _scaler, true);
if (_subtitle) {
- Rect tx = subtitle_transformed_area (
+ dvdomatic::Rect tx = subtitle_transformed_area (
float (_out_size.width) / _input->size().width,
float (_out_size.height) / _input->size().height,
_subtitle->area(), _subtitle_offset, _subtitle_scale
* in the coordinate space of the source.
* @param subtitle_scale scaling factor to apply to the subtitle image.
*/
-Rect
+dvdomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- Rect sub_area, int subtitle_offset, float subtitle_scale
+ dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
)
{
- Rect tx;
+ dvdomatic::Rect tx;
sub_area.y += subtitle_offset;
}
/** @return area that this subtitle takes up, in the original uncropped source's coordinate space */
-Rect
+dvdomatic::Rect
Subtitle::area () const
{
- return Rect (_position.x, _position.y, _image->size().width, _image->size().height);
+ return dvdomatic::Rect (_position.x, _position.y, _image->size().width, _image->size().height);
}
return _image;
}
- Rect area () const;
+ dvdomatic::Rect area () const;
private:
Position _position;
boost::shared_ptr<Image> _image;
};
-Rect
+dvdomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- Rect sub_area, int subtitle_offset, float subtitle_scale
+ dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
);
/** A Subtitle class with details of the time over which it should be shown */
/** @param other A Rect.
* @return The intersection of this with `other'.
*/
-Rect
-Rect::intersection (Rect const & other) const
+dvdomatic::Rect
+dvdomatic::Rect::intersection (Rect const & other) const
{
int const tx = max (x, other.x);
int const ty = max (y, other.y);
#define TIMING(...)
#endif
+#undef check
+
/** The maximum number of audio channels that we can cope with */
#define MAX_AUDIO_CHANNELS 6
int y;
};
+namespace dvdomatic
+{
+
/** @struct Rect
* @brief A rectangle.
*/
Rect intersection (Rect const & other) const;
};
+}
+
extern std::string crop_string (Position, libdcp::Size);
extern int dcp_audio_sample_rate (int);
extern std::string colour_lut_index_to_name (int index);
#ifdef __WXMSW__
#include <shellapi.h>
#endif
+#ifdef __WXOSX__
+#include <ApplicationServices/ApplicationServices.h>
+#endif
#include <wx/aboutdlg.h>
#include <wx/stdpaths.h>
#include <wx/cmdline.h>
#ifdef DVDOMATIC_POSIX
unsetenv ("UBUNTU_MENUPROXY");
+#endif
+
+#ifdef __WXOSX__
+ ProcessSerialNumber serial;
+ GetCurrentProcess (&serial);
+ TransformProcessType (&serial, kProcessTransformToForegroundApplication);
#endif
wxInitAllImageHandlers ();
Size const cropped_size = _film->cropped_size (_film->size ());
- Rect tx = subtitle_transformed_area (
+ dvdomatic::Rect tx = subtitle_transformed_area (
float (_film_size.width) / cropped_size.width,
float (_film_size.height) / cropped_size.height,
_raw_sub->area(), _film->subtitle_offset(), _film->subtitle_scale()