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

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

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again 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/fxge/ge/fx_ge_text.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.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 "core/include/fxge/fx_ge.h" 7 #include "core/include/fxge/fx_ge.h"
8 8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
10 #include <windows.h> 10 #include <windows.h>
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 if (!bTextMode) { 975 if (!bTextMode) {
976 FX_FLOAT unit = 976 FX_FLOAT unit =
977 pMatrix ? 1.0f / ((pMatrix->GetXUnit() + pMatrix->GetYUnit()) / 2) 977 pMatrix ? 1.0f / ((pMatrix->GetXUnit() + pMatrix->GetYUnit()) / 2)
978 : 1.0f; 978 : 1.0f;
979 if (width < unit) { 979 if (width < unit) {
980 width = unit; 980 width = unit;
981 } 981 }
982 } 982 }
983 GpPen* pPen = NULL; 983 GpPen* pPen = NULL;
984 CallFunc(GdipCreatePen1)((ARGB)argb, width, UnitWorld, &pPen); 984 CallFunc(GdipCreatePen1)((ARGB)argb, width, UnitWorld, &pPen);
985 LineCap lineCap; 985 LineCap lineCap = LineCapFlat;
986 DashCap dashCap = DashCapFlat; 986 DashCap dashCap = DashCapFlat;
987 FX_BOOL bDashExtend = FALSE; 987 FX_BOOL bDashExtend = FALSE;
988 switch (pGraphState->m_LineCap) { 988 switch (pGraphState->m_LineCap) {
989 case CFX_GraphStateData::LineCapButt: 989 case CFX_GraphStateData::LineCapButt:
990 lineCap = LineCapFlat; 990 lineCap = LineCapFlat;
991 break; 991 break;
992 case CFX_GraphStateData::LineCapRound: 992 case CFX_GraphStateData::LineCapRound:
993 lineCap = LineCapRound; 993 lineCap = LineCapRound;
994 dashCap = DashCapRound; 994 dashCap = DashCapRound;
995 bDashExtend = TRUE; 995 bDashExtend = TRUE;
996 break; 996 break;
997 case CFX_GraphStateData::LineCapSquare: 997 case CFX_GraphStateData::LineCapSquare:
998 lineCap = LineCapSquare; 998 lineCap = LineCapSquare;
999 bDashExtend = TRUE; 999 bDashExtend = TRUE;
1000 break; 1000 break;
1001 } 1001 }
1002 CallFunc(GdipSetPenLineCap197819)(pPen, lineCap, lineCap, dashCap); 1002 CallFunc(GdipSetPenLineCap197819)(pPen, lineCap, lineCap, dashCap);
1003 LineJoin lineJoin; 1003 LineJoin lineJoin = LineJoinMiterClipped;
1004 switch (pGraphState->m_LineJoin) { 1004 switch (pGraphState->m_LineJoin) {
1005 case CFX_GraphStateData::LineJoinMiter: 1005 case CFX_GraphStateData::LineJoinMiter:
1006 lineJoin = LineJoinMiterClipped; 1006 lineJoin = LineJoinMiterClipped;
1007 break; 1007 break;
1008 case CFX_GraphStateData::LineJoinRound: 1008 case CFX_GraphStateData::LineJoinRound:
1009 lineJoin = LineJoinRound; 1009 lineJoin = LineJoinRound;
1010 break; 1010 break;
1011 case CFX_GraphStateData::LineJoinBevel: 1011 case CFX_GraphStateData::LineJoinBevel:
1012 lineJoin = LineJoinBevel; 1012 lineJoin = LineJoinBevel;
1013 break; 1013 break;
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 dest_pitch); 1509 dest_pitch);
1510 } 1510 }
1511 } 1511 }
1512 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( 1512 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(
1513 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); 1513 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32);
1514 FX_Free(pData); 1514 FX_Free(pData);
1515 FreeDIBitmap(pInfo); 1515 FreeDIBitmap(pInfo);
1516 return pDIBitmap; 1516 return pDIBitmap;
1517 } 1517 }
1518 #endif 1518 #endif
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_text.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698