summaryrefslogtreecommitdiff
path: root/src/lib/types.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-10 01:39:38 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-10 01:39:38 +0100
commit9063624bd62c8fb513b51077300a74c7e46a56d9 (patch)
tree9ebb5b4fddfb13ebbc88ccdd48013258c8e7e930 /src/lib/types.h
parent02b74112721d13a27b0bbaece714d5c8ea743d43 (diff)
Extract crop.h
Diffstat (limited to 'src/lib/types.h')
-rw-r--r--src/lib/types.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/lib/types.h b/src/lib/types.h
index f2a79b2fd..ab3f15841 100644
--- a/src/lib/types.h
+++ b/src/lib/types.h
@@ -167,44 +167,6 @@ extern std::string text_type_to_string (TextType t);
extern std::string text_type_to_name (TextType t);
extern TextType string_to_text_type (std::string s);
-/** @struct Crop
- * @brief A description of the crop of an image or video.
- */
-struct Crop
-{
- Crop () : left (0), right (0), top (0), bottom (0) {}
- Crop (int l, int r, int t, int b) : left (l), right (r), top (t), bottom (b) {}
- explicit Crop (std::shared_ptr<cxml::Node>);
-
- /** Number of pixels to remove from the left-hand side */
- int left;
- /** Number of pixels to remove from the right-hand side */
- int right;
- /** Number of pixels to remove from the top */
- int top;
- /** Number of pixels to remove from the bottom */
- int bottom;
-
- dcp::Size apply (dcp::Size s, int minimum = 4) const {
- s.width -= left + right;
- s.height -= top + bottom;
-
- if (s.width < minimum) {
- s.width = minimum;
- }
-
- if (s.height < minimum) {
- s.height = minimum;
- }
-
- return s;
- }
-
- void as_xml (xmlpp::Node *) const;
-};
-
-extern bool operator== (Crop const & a, Crop const & b);
-extern bool operator!= (Crop const & a, Crop const & b);
struct CPLSummary
{