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_INCLUDE_FXCRT_FX_COORDINATES_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
9 | 9 |
10 #include "core/include/fxcrt/fx_basic.h" | 10 #include "core/include/fxcrt/fx_basic.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 FX_RECT ToFxRect() const { | 303 FX_RECT ToFxRect() const { |
304 return FX_RECT(static_cast<int32_t>(left), static_cast<int32_t>(top), | 304 return FX_RECT(static_cast<int32_t>(left), static_cast<int32_t>(top), |
305 static_cast<int32_t>(right), static_cast<int32_t>(bottom)); | 305 static_cast<int32_t>(right), static_cast<int32_t>(bottom)); |
306 } | 306 } |
307 | 307 |
308 FX_FLOAT left; | 308 FX_FLOAT left; |
309 FX_FLOAT bottom; | 309 FX_FLOAT bottom; |
310 FX_FLOAT right; | 310 FX_FLOAT right; |
311 FX_FLOAT top; | 311 FX_FLOAT top; |
312 }; | 312 }; |
| 313 using CFX_RectArray = CFX_ArrayTemplate<CFX_FloatRect>; |
313 | 314 |
314 // LTWH rectangles (y-axis runs downwards). | 315 // LTWH rectangles (y-axis runs downwards). |
315 template <class baseType> | 316 template <class baseType> |
316 class CFX_RTemplate { | 317 class CFX_RTemplate { |
317 public: | 318 public: |
318 typedef CFX_PSTemplate<baseType> FXT_POINT; | 319 typedef CFX_PSTemplate<baseType> FXT_POINT; |
319 typedef CFX_PSTemplate<baseType> FXT_SIZE; | 320 typedef CFX_PSTemplate<baseType> FXT_SIZE; |
320 typedef CFX_VTemplate<baseType> FXT_VECTOR; | 321 typedef CFX_VTemplate<baseType> FXT_VECTOR; |
321 typedef CFX_RTemplate<baseType> FXT_RECT; | 322 typedef CFX_RTemplate<baseType> FXT_RECT; |
322 void Set(baseType left, baseType top, baseType width, baseType height) { | 323 void Set(baseType left, baseType top, baseType width, baseType height) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 public: | 663 public: |
663 FX_FLOAT a; | 664 FX_FLOAT a; |
664 FX_FLOAT b; | 665 FX_FLOAT b; |
665 FX_FLOAT c; | 666 FX_FLOAT c; |
666 FX_FLOAT d; | 667 FX_FLOAT d; |
667 FX_FLOAT e; | 668 FX_FLOAT e; |
668 FX_FLOAT f; | 669 FX_FLOAT f; |
669 }; | 670 }; |
670 | 671 |
671 #endif // CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ | 672 #endif // CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
OLD | NEW |