OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 goog.provide('image.collections.extension.domextractor.Size'); |
| 6 |
| 7 |
| 8 goog.scope(function() { |
| 9 |
| 10 |
| 11 |
| 12 /** |
| 13 * @param {number} width |
| 14 * @param {number} height |
| 15 * @constructor |
| 16 */ |
| 17 image.collections.extension.domextractor.Size = function(width, height) { |
| 18 /** @type {number} */ |
| 19 this.width = width; |
| 20 |
| 21 /** @type {number} */ |
| 22 this.height = height; |
| 23 }; |
| 24 |
| 25 |
| 26 /** |
| 27 * @return {number} The area of the size (width * height). |
| 28 */ |
| 29 image.collections.extension.domextractor.Size.prototype.area = function() { |
| 30 return this.width * this.height; |
| 31 }; |
| 32 }); |
OLD | NEW |