Index: third_party/document_image_extractor/src/size.js |
diff --git a/third_party/document_image_extractor/src/size.js b/third_party/document_image_extractor/src/size.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a77325938576b499637922062cc6647d21fb2ab9 |
--- /dev/null |
+++ b/third_party/document_image_extractor/src/size.js |
@@ -0,0 +1,32 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+goog.provide('image.collections.extension.domextractor.Size'); |
+ |
+ |
+goog.scope(function() { |
+ |
+ |
+ |
+/** |
+ * @param {number} width |
+ * @param {number} height |
+ * @constructor |
+ */ |
+image.collections.extension.domextractor.Size = function(width, height) { |
+ /** @type {number} */ |
+ this.width = width; |
+ |
+ /** @type {number} */ |
+ this.height = height; |
+}; |
+ |
+ |
+/** |
+ * @return {number} The area of the size (width * height). |
+ */ |
+image.collections.extension.domextractor.Size.prototype.area = function() { |
+ return this.width * this.height; |
+}; |
+}); |