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

Unified Diff: core/src/fxge/ge/fx_ge_path.cpp

Issue 1727793002: Remove FXSYS_Div. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/dib/fx_dib_engine.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_path.cpp
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 0084f092d1575caa16566b68570ff018b147f920..0c24c0ff644789dfa233cccd648d2858acc22c47 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -263,14 +263,14 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
return;
}
if (!bStartVert) {
- start_k = FXSYS_Div(middle_y - start_y, middle_x - start_x);
+ start_k = (middle_y - start_y) / (middle_x - start_x);
start_c = middle_y - (start_k * middle_x);
start_len = FXSYS_sqrt2(start_x - middle_x, start_y - middle_y);
start_dc = (FX_FLOAT)FXSYS_fabs(
FXSYS_MulDiv(half_width, start_len, start_x - middle_x));
}
if (!bEndVert) {
- end_k = FXSYS_Div(end_y - middle_y, end_x - middle_x);
+ end_k = (end_y - middle_y) / (end_x - middle_x);
end_c = middle_y - (end_k * middle_x);
end_len = FXSYS_sqrt2(end_x - middle_x, end_y - middle_y);
end_dc = (FX_FLOAT)FXSYS_fabs(
@@ -331,7 +331,7 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
} else {
end_outside_c -= end_dc;
}
- FX_FLOAT join_x = FXSYS_Div(end_outside_c - start_outside_c, start_k - end_k);
+ FX_FLOAT join_x = (end_outside_c - start_outside_c) / (start_k - end_k);
FX_FLOAT join_y = (start_k * join_x) + start_outside_c;
rect.UpdateRect(join_x, join_y);
}
« no previous file with comments | « core/src/fxge/dib/fx_dib_engine.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698