| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ |
| 8 #define CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 int32_t left; | 173 int32_t left; |
| 174 int32_t top; | 174 int32_t top; |
| 175 int32_t right; | 175 int32_t right; |
| 176 int32_t bottom; | 176 int32_t bottom; |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 // LBRT rectangles (y-axis runs upwards). | 179 // LBRT rectangles (y-axis runs upwards). |
| 180 class CFX_FloatPoint { | 180 class CFX_FloatPoint { |
| 181 public: | 181 public: |
| 182 CFX_FloatPoint() : x(0.0f), y(0.0f) {} |
| 182 CFX_FloatPoint(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} | 183 CFX_FloatPoint(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} |
| 183 | 184 |
| 185 bool operator==(const CFX_FloatPoint& that) const { |
| 186 return x == that.x && y == that.y; |
| 187 } |
| 188 bool operator!=(const CFX_FloatPoint& that) const { return !(*this == that); } |
| 189 |
| 184 FX_FLOAT x; | 190 FX_FLOAT x; |
| 185 FX_FLOAT y; | 191 FX_FLOAT y; |
| 186 }; | 192 }; |
| 187 | 193 |
| 188 class CFX_FloatRect { | 194 class CFX_FloatRect { |
| 189 public: | 195 public: |
| 190 CFX_FloatRect() : CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f) {} | 196 CFX_FloatRect() : CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f) {} |
| 191 CFX_FloatRect(FX_FLOAT l, FX_FLOAT b, FX_FLOAT r, FX_FLOAT t) | 197 CFX_FloatRect(FX_FLOAT l, FX_FLOAT b, FX_FLOAT r, FX_FLOAT t) |
| 192 : left(l), bottom(b), right(r), top(t) {} | 198 : left(l), bottom(b), right(r), top(t) {} |
| 193 | 199 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 public: | 658 public: |
| 653 FX_FLOAT a; | 659 FX_FLOAT a; |
| 654 FX_FLOAT b; | 660 FX_FLOAT b; |
| 655 FX_FLOAT c; | 661 FX_FLOAT c; |
| 656 FX_FLOAT d; | 662 FX_FLOAT d; |
| 657 FX_FLOAT e; | 663 FX_FLOAT e; |
| 658 FX_FLOAT f; | 664 FX_FLOAT f; |
| 659 }; | 665 }; |
| 660 | 666 |
| 661 #endif // CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ | 667 #endif // CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ |
| OLD | NEW |