X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Futil.h;h=f7b4704ace52caa583c2d09fb85926ba4a050aa7;hb=15a83d720780d58f905d40f8493cdcb86596eaee;hp=12c79ea5a374cabe566d751e9f5c250db71b22ba;hpb=bcc4e2f7dc4cd5658e199ddacb7202b00ec72cf1;p=dcpomatic.git diff --git a/src/lib/util.h b/src/lib/util.h index 12c79ea5a..f7b4704ac 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -116,6 +116,7 @@ extern void copy_in_bits (boost::filesystem::path from, boost::filesystem::path extern boost::shared_ptr read_swaroop_chain (boost::filesystem::path path); extern void write_swaroop_chain (boost::shared_ptr chain, boost::filesystem::path output); #endif +extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container); template std::list @@ -128,6 +129,17 @@ vector_to_list (std::vector v) return l; } +template +std::vector +list_to_vector (std::list v) +{ + std::vector l; + BOOST_FOREACH (T& i, v) { + l.push_back (i); + } + return l; +} + extern double db_to_linear (double db); extern double linear_to_db (double linear);