OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 #ifndef DOMRect_h |
| 6 #define DOMRect_h |
| 7 |
| 8 #include "bindings/core/v8/Dictionary.h" |
| 9 #include "core/CoreExport.h" |
| 10 #include "core/dom/DOMRectReadOnly.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class DOMRect; |
| 15 class DOMRectInit; |
| 16 |
| 17 class CORE_EXPORT DOMRect final : public DOMRectReadOnly { |
| 18 DEFINE_WRAPPERTYPEINFO(); |
| 19 |
| 20 public: |
| 21 static DOMRect* create(double x = 0, |
| 22 double y = 0, |
| 23 double width = 0, |
| 24 double height = 0); |
| 25 static DOMRect* fromRect(const DOMRectInit&); |
| 26 |
| 27 void setX(double x) { m_x = x; } |
| 28 void setY(double y) { m_y = y; } |
| 29 void setWidth(double width) { m_width = width; } |
| 30 void setHeight(double height) { m_height = height; } |
| 31 |
| 32 protected: |
| 33 DOMRect(double x, double y, double z, double w); |
| 34 }; |
| 35 |
| 36 } // namespace blink |
| 37 |
| 38 #endif |
OLD | NEW |