summaryrefslogtreecommitdiff
path: root/src/lib/format.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-25 20:54:29 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-25 20:54:29 +0000
commit9e92f4742708e8b1516623647ee458211fdd68c1 (patch)
tree484d1bb636788df7c7b2aa1b9a4232d964007b7c /src/lib/format.cc
parent97b0f3af79c79ac4b9273e93090ef41753faba6c (diff)
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).
Diffstat (limited to 'src/lib/format.cc')
-rw-r--r--src/lib/format.cc9
1 files changed, 9 insertions, 0 deletions
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<const Film> f) const
{
@@ -160,6 +163,12 @@ Format::dcp_padding (shared_ptr<const Film> f) const
return p;
}
+float
+Format::container_ratio_as_float () const
+{
+ return static_cast<float> (_dcp_size.width) / _dcp_size.height;
+}
+
VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d)
: Format (dcp, id, n, d)
{