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

Side by Side Diff: core/fxge/win32/fx_win32_gdipext.cpp

Issue 2454263002: Fix more FX_BOOL / int noise in core/fpdfsdk (Closed)
Patch Set: nit Created 4 years, 1 month 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/fxge/win32/fx_win32_device.cpp ('k') | fpdfsdk/javascript/Document.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 // 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 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 return FALSE; 1226 return FALSE;
1227 } 1227 }
1228 if (new_fill_mode) { 1228 if (new_fill_mode) {
1229 GpBrush* pBrush = _GdipCreateBrush(fill_argb); 1229 GpBrush* pBrush = _GdipCreateBrush(fill_argb);
1230 CallFunc(GdipSetPathFillMode)(pGpPath, GdiFillType2Gdip(new_fill_mode)); 1230 CallFunc(GdipSetPathFillMode)(pGpPath, GdiFillType2Gdip(new_fill_mode));
1231 CallFunc(GdipFillPath)(pGraphics, pBrush, pGpPath); 1231 CallFunc(GdipFillPath)(pGraphics, pBrush, pGpPath);
1232 CallFunc(GdipDeleteBrush)(pBrush); 1232 CallFunc(GdipDeleteBrush)(pBrush);
1233 } 1233 }
1234 if (pGraphState && stroke_argb) { 1234 if (pGraphState && stroke_argb) {
1235 GpPen* pPen = _GdipCreatePen(pGraphState, pObject2Device, stroke_argb, 1235 GpPen* pPen = _GdipCreatePen(pGraphState, pObject2Device, stroke_argb,
1236 fill_mode & FX_STROKE_TEXT_MODE); 1236 !!(fill_mode & FX_STROKE_TEXT_MODE));
1237 if (nSubPathes == 1) { 1237 if (nSubPathes == 1) {
1238 CallFunc(GdipDrawPath)(pGraphics, pPen, pGpPath); 1238 CallFunc(GdipDrawPath)(pGraphics, pPen, pGpPath);
1239 } else { 1239 } else {
1240 int iStart = 0; 1240 int iStart = 0;
1241 for (int i = 0; i < nPoints; i++) { 1241 for (int i = 0; i < nPoints; i++) {
1242 if (i == nPoints - 1 || types[i + 1] == PathPointTypeStart) { 1242 if (i == nPoints - 1 || types[i + 1] == PathPointTypeStart) {
1243 GpPath* pSubPath; 1243 GpPath* pSubPath;
1244 CallFunc(GdipCreatePath2)(points + iStart, types + iStart, 1244 CallFunc(GdipCreatePath2)(points + iStart, types + iStart,
1245 i - iStart + 1, 1245 i - iStart + 1,
1246 GdiFillType2Gdip(new_fill_mode), &pSubPath); 1246 GdiFillType2Gdip(new_fill_mode), &pSubPath);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i, 1517 FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i,
1518 dest_pitch); 1518 dest_pitch);
1519 } 1519 }
1520 } 1520 }
1521 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( 1521 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(
1522 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); 1522 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32);
1523 FX_Free(pData); 1523 FX_Free(pData);
1524 FreeDIBitmap(pInfo); 1524 FreeDIBitmap(pInfo);
1525 return pDIBitmap; 1525 return pDIBitmap;
1526 } 1526 }
OLDNEW
« no previous file with comments | « core/fxge/win32/fx_win32_device.cpp ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698