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

Side by Side Diff: third_party/agg23/agg_clip_liang_barsky.h

Issue 1729613003: Remove FXSYS_Mul. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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/src/fxge/win32/fx_win32_gdipext.cpp ('k') | third_party/agg23/agg_curves.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 //---------------------------------------------------------------------------- 2 //----------------------------------------------------------------------------
3 // Anti-Grain Geometry - Version 2.3 3 // Anti-Grain Geometry - Version 2.3
4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
5 // 5 //
6 // Permission to copy, use, modify, sell and distribute this software 6 // Permission to copy, use, modify, sell and distribute this software
7 // is granted provided this copyright notice appears in all copies. 7 // is granted provided this copyright notice appears in all copies.
8 // This software is provided "as is" without express or implied 8 // This software is provided "as is" without express or implied
9 // warranty, and with no claim as to its suitability for any purpose. 9 // warranty, and with no claim as to its suitability for any purpose.
10 // 10 //
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ++np; 78 ++np;
79 } 79 }
80 if(tin2 <= 1.0f) { 80 if(tin2 <= 1.0f) {
81 FX_FLOAT toutx = FXSYS_Div(xout - x1, deltax); 81 FX_FLOAT toutx = FXSYS_Div(xout - x1, deltax);
82 FX_FLOAT touty = FXSYS_Div(yout - y1, deltay); 82 FX_FLOAT touty = FXSYS_Div(yout - y1, deltay);
83 FX_FLOAT tout1 = (toutx < touty) ? toutx : touty; 83 FX_FLOAT tout1 = (toutx < touty) ? toutx : touty;
84 if(tin2 > 0 || tout1 > 0) { 84 if(tin2 > 0 || tout1 > 0) {
85 if(tin2 <= tout1) { 85 if(tin2 <= tout1) {
86 if(tin2 > 0) { 86 if(tin2 > 0) {
87 if(tinx > tiny) { 87 if(tinx > tiny) {
88 *x++ = (T)xin; 88 *x++ = (T)xin;
89 *y++ = (T)(y1 + FXSYS_Mul(deltay, tinx)); 89 *y++ = (T)(y1 + (deltay * tinx));
90 } else { 90 } else {
91 *x++ = (T)(x1 + FXSYS_Mul(deltax, tiny)); 91 *x++ = (T)(x1 + (deltax * tiny));
92 *y++ = (T)yin; 92 *y++ = (T)yin;
93 } 93 }
94 ++np; 94 ++np;
95 } 95 }
96 if(tout1 < 1.0f) { 96 if(tout1 < 1.0f) {
97 if(toutx < touty) { 97 if(toutx < touty) {
98 *x++ = (T)xout; 98 *x++ = (T)xout;
99 *y++ = (T)(y1 + FXSYS_Mul(deltay, toutx)); 99 *y++ = (T)(y1 + (deltay * toutx));
100 } else { 100 } else {
101 *x++ = (T)(x1 + FXSYS_Mul(deltax, touty)); 101 *x++ = (T)(x1 + (deltax * touty));
102 *y++ = (T)yout; 102 *y++ = (T)yout;
103 } 103 }
104 } else { 104 } else {
105 *x++ = x2; 105 *x++ = x2;
106 *y++ = y2; 106 *y++ = y2;
107 } 107 }
108 ++np; 108 ++np;
109 } else { 109 } else {
110 if(tinx > tiny) { 110 if(tinx > tiny) {
111 *x++ = (T)xin; 111 *x++ = (T)xin;
112 *y++ = (T)yout; 112 *y++ = (T)yout;
113 } else { 113 } else {
114 *x++ = (T)xout; 114 *x++ = (T)xout;
115 *y++ = (T)yin; 115 *y++ = (T)yin;
116 } 116 }
117 ++np; 117 ++np;
118 } 118 }
119 } 119 }
120 } 120 }
121 } 121 }
122 return np; 122 return np;
123 } 123 }
124 } 124 }
125 #endif 125 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_gdipext.cpp ('k') | third_party/agg23/agg_curves.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698