Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: core/include/fxcrt/fx_coordinates.h

Issue 1087053002: Merge to XFA: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/include/fxcrt/fx_memory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 _FXCRT_COORDINATES_ 7 #ifndef _FXCRT_COORDINATES_
8 #define _FXCRT_COORDINATES_ 8 #define _FXCRT_COORDINATES_
9 9
10 #include "fx_basic.h" 10 #include "fx_basic.h"
11 11
12 template<class baseType> class CFX_PSVTemplate; 12 template<class baseType> class CFX_PSVTemplate;
13 template<class baseType> class CFX_VTemplate; 13 template<class baseType> class CFX_VTemplate;
14 template<class baseType> class CFX_PRLTemplate; 14 template<class baseType> class CFX_PRLTemplate;
15 template<class baseType> class CFX_RTemplate; 15 template<class baseType> class CFX_RTemplate;
16 template<class baseType> class CFX_ETemplate; 16 template<class baseType> class CFX_ETemplate;
17 template<class baseType> class CFX_ATemplate; 17 template<class baseType> class CFX_ATemplate;
18 template<class baseType> class CFX_RRTemplate; 18 template<class baseType> class CFX_RRTemplate;
19 class CFX_Matrix; 19 class CFX_Matrix;
20 template<class baseType> 20 template<class baseType>
21 class CFX_PSVTemplate : public CFX_Object 21 class CFX_PSVTemplate
22 { 22 {
23 public: 23 public:
24 typedef CFX_PSVTemplate<baseType> FXT_PSV; 24 typedef CFX_PSVTemplate<baseType> FXT_PSV;
25 typedef CFX_PSVTemplate<baseType> FXT_POINT; 25 typedef CFX_PSVTemplate<baseType> FXT_POINT;
26 typedef CFX_PSVTemplate<baseType> FXT_SIZE; 26 typedef CFX_PSVTemplate<baseType> FXT_SIZE;
27 void Set(baseType x, baseType y) 27 void Set(baseType x, baseType y)
28 { 28 {
29 FXT_PSV::x = x, FXT_PSV::y = y; 29 FXT_PSV::x = x, FXT_PSV::y = y;
30 } 30 }
31 void Set(const FXT_PSV &psv) 31 void Set(const FXT_PSV &psv)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 { 223 {
224 CFX_VTemplate vx; 224 CFX_VTemplate vx;
225 vx.Set(1, 0); 225 vx.Set(1, 0);
226 FX_FLOAT fSlope = ArcCosine(v, vx); 226 FX_FLOAT fSlope = ArcCosine(v, vx);
227 return v.y < 0 ? -fSlope : fSlope; 227 return v.y < 0 ? -fSlope : fSlope;
228 } 228 }
229 }; 229 };
230 typedef CFX_VTemplate<FX_INT32> CFX_Vector; 230 typedef CFX_VTemplate<FX_INT32> CFX_Vector;
231 typedef CFX_VTemplate<FX_FLOAT> CFX_VectorF; 231 typedef CFX_VTemplate<FX_FLOAT> CFX_VectorF;
232 template<class baseType> 232 template<class baseType>
233 class CFX_RTemplate: public CFX_Object 233 class CFX_RTemplate
234 { 234 {
235 public: 235 public:
236 typedef CFX_PSVTemplate<baseType> FXT_POINT; 236 typedef CFX_PSVTemplate<baseType> FXT_POINT;
237 typedef CFX_PSVTemplate<baseType> FXT_SIZE; 237 typedef CFX_PSVTemplate<baseType> FXT_SIZE;
238 typedef CFX_VTemplate<baseType> FXT_VECTOR; 238 typedef CFX_VTemplate<baseType> FXT_VECTOR;
239 typedef CFX_PRLTemplate<baseType> FXT_PARAL; 239 typedef CFX_PRLTemplate<baseType> FXT_PARAL;
240 typedef CFX_RTemplate<baseType> FXT_RECT; 240 typedef CFX_RTemplate<baseType> FXT_RECT;
241 void Set(baseType left, baseType top, baseType width, baseTyp e height) 241 void Set(baseType left, baseType top, baseType width, baseTyp e height)
242 { 242 {
243 FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::width = width, FXT _RECT::height = height; 243 FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::width = width, FXT _RECT::height = height;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 struct FX_SMALL_RECT { 603 struct FX_SMALL_RECT {
604 604
605 FX_SHORT Left; 605 FX_SHORT Left;
606 606
607 FX_SHORT Top; 607 FX_SHORT Top;
608 608
609 FX_SHORT Right; 609 FX_SHORT Right;
610 610
611 FX_SHORT Bottom; 611 FX_SHORT Bottom;
612 }; 612 };
613 class CFX_FloatRect : public CFX_Object 613 class CFX_FloatRect
614 { 614 {
615 public: 615 public:
616 616
617 CFX_FloatRect() 617 CFX_FloatRect()
618 { 618 {
619 left = right = bottom = top = 0; 619 left = right = bottom = top = 0;
620 } 620 }
621 621
622 CFX_FloatRect(FX_FLOAT left1, FX_FLOAT bottom1, FX_FLOAT right1, FX_FLOAT to p1) 622 CFX_FloatRect(FX_FLOAT left1, FX_FLOAT bottom1, FX_FLOAT right1, FX_FLOAT to p1)
623 { 623 {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 static CFX_FloatRect GetBBox(const CFX_FloatPoint* pPoints, int nPoin ts); 742 static CFX_FloatRect GetBBox(const CFX_FloatPoint* pPoints, int nPoin ts);
743 743
744 FX_FLOAT left; 744 FX_FLOAT left;
745 745
746 FX_FLOAT right; 746 FX_FLOAT right;
747 747
748 FX_FLOAT bottom; 748 FX_FLOAT bottom;
749 749
750 FX_FLOAT top; 750 FX_FLOAT top;
751 }; 751 };
752 class CFX_Matrix : public CFX_Object 752 class CFX_Matrix
753 { 753 {
754 public: 754 public:
755 755
756 CFX_Matrix() 756 CFX_Matrix()
757 { 757 {
758 a = d = 1; 758 a = d = 1;
759 b = c = e = f = 0; 759 b = c = e = f = 0;
760 } 760 }
761 761
762 CFX_Matrix(FX_FLOAT a1, FX_FLOAT b1, FX_FLOAT c1, FX_FLOAT d1, FX_FLOAT e1, FX_FLOAT f1) 762 CFX_Matrix(FX_FLOAT a1, FX_FLOAT b1, FX_FLOAT c1, FX_FLOAT d1, FX_FLOAT e1, FX_FLOAT f1)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 public: 897 public:
898 FX_FLOAT a; 898 FX_FLOAT a;
899 FX_FLOAT b; 899 FX_FLOAT b;
900 FX_FLOAT c; 900 FX_FLOAT c;
901 FX_FLOAT d; 901 FX_FLOAT d;
902 FX_FLOAT e; 902 FX_FLOAT e;
903 FX_FLOAT f; 903 FX_FLOAT f;
904 }; 904 };
905 #define CFX_AffineMatrix CFX_Matrix 905 #define CFX_AffineMatrix CFX_Matrix
906 #endif 906 #endif
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/include/fxcrt/fx_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698