From 9e92f4742708e8b1516623647ee458211fdd68c1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Jan 2013 20:54:29 +0000 Subject: Fix signalling of wxChoices that used to be ComboBoxes. Use Size a little more. Show any padding of films into larger frames in the preview (#33). --- src/lib/format.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/format.cc') diff --git a/src/lib/format.cc b/src/lib/format.cc index 088a16059..6615e16e0 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -147,6 +147,9 @@ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d } +/** @return Number of pixels (int the DCP image) to pad either side of the film + * (so there are dcp_padding() pixels on the left and dcp_padding() on the right) + */ int Format::dcp_padding (shared_ptr f) const { @@ -160,6 +163,12 @@ Format::dcp_padding (shared_ptr f) const return p; } +float +Format::container_ratio_as_float () const +{ + return static_cast (_dcp_size.width) / _dcp_size.height; +} + VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d) : Format (dcp, id, n, d) { -- cgit v1.2.3