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

Side by Side Diff: xfa/fxfa/app/xfa_ffpath.cpp

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: 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 | « xfa/fxfa/app/xfa_ffpageview.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.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 #include "xfa/fxfa/app/xfa_ffpath.h" 7 #include "xfa/fxfa/app/xfa_ffpath.h"
8 8
9 #include "xfa/fxfa/app/xfa_ffdraw.h" 9 #include "xfa/fxfa/app/xfa_ffdraw.h"
10 #include "xfa/fxfa/xfa_ffapp.h" 10 #include "xfa/fxfa/xfa_ffapp.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return; 56 return;
57 } 57 }
58 CXFA_Value value = m_pDataAcc->GetFormValue(); 58 CXFA_Value value = m_pDataAcc->GetFormValue();
59 if (!value) { 59 if (!value) {
60 return; 60 return;
61 } 61 }
62 CXFA_Line lineObj = value.GetLine(); 62 CXFA_Line lineObj = value.GetLine();
63 FX_ARGB lineColor = 0xFF000000; 63 FX_ARGB lineColor = 0xFF000000;
64 int32_t iStrokeType = 0; 64 int32_t iStrokeType = 0;
65 FX_FLOAT fLineWidth = 1.0f; 65 FX_FLOAT fLineWidth = 1.0f;
66 FX_BOOL bSlope = lineObj.GetSlop(); 66 bool bSlope = lineObj.GetSlop();
67 int32_t iCap = 0; 67 int32_t iCap = 0;
68 CXFA_Edge edge = lineObj.GetEdge(); 68 CXFA_Edge edge = lineObj.GetEdge();
69 if (edge) { 69 if (edge) {
70 if (edge.GetPresence() != XFA_ATTRIBUTEENUM_Visible) { 70 if (edge.GetPresence() != XFA_ATTRIBUTEENUM_Visible) {
71 return; 71 return;
72 } 72 }
73 lineColor = edge.GetColor(); 73 lineColor = edge.GetColor();
74 iStrokeType = edge.GetStrokeType(); 74 iStrokeType = edge.GetStrokeType();
75 fLineWidth = edge.GetThickness(); 75 fLineWidth = edge.GetThickness();
76 iCap = edge.GetCapType(); 76 iCap = edge.GetCapType();
(...skipping 11 matching lines...) Expand all
88 GetRectFromHand(rtLine, lineObj.GetHand(), fLineWidth); 88 GetRectFromHand(rtLine, lineObj.GetHand(), fLineWidth);
89 CFX_Path linePath; 89 CFX_Path linePath;
90 linePath.Create(); 90 linePath.Create();
91 if (bSlope && rtLine.right() > 0.0f && rtLine.bottom() > 0.0f) { 91 if (bSlope && rtLine.right() > 0.0f && rtLine.bottom() > 0.0f) {
92 linePath.AddLine(rtLine.right(), rtLine.top, rtLine.left, rtLine.bottom()); 92 linePath.AddLine(rtLine.right(), rtLine.top, rtLine.left, rtLine.bottom());
93 } else { 93 } else {
94 linePath.AddLine(rtLine.left, rtLine.top, rtLine.right(), rtLine.bottom()); 94 linePath.AddLine(rtLine.left, rtLine.top, rtLine.right(), rtLine.bottom());
95 } 95 }
96 CFX_Color color(lineColor); 96 CFX_Color color(lineColor);
97 pGS->SaveGraphState(); 97 pGS->SaveGraphState();
98 pGS->SetLineWidth(fLineWidth, TRUE); 98 pGS->SetLineWidth(fLineWidth, true);
99 XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap); 99 XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap);
100 pGS->SetStrokeColor(&color); 100 pGS->SetStrokeColor(&color);
101 pGS->SetLineCap(XFA_LineCapToFXGE(iCap)); 101 pGS->SetLineCap(XFA_LineCapToFXGE(iCap));
102 pGS->StrokePath(&linePath, &mtRotate); 102 pGS->StrokePath(&linePath, &mtRotate);
103 pGS->RestoreGraphState(); 103 pGS->RestoreGraphState();
104 } 104 }
105 CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) 105 CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
106 : CXFA_FFDraw(pPageView, pDataAcc) {} 106 : CXFA_FFDraw(pPageView, pDataAcc) {}
107 CXFA_FFArc::~CXFA_FFArc() {} 107 CXFA_FFArc::~CXFA_FFArc() {}
108 void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, 108 void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) { 148 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
149 XFA_RectWidthoutMargin(rect, mgWidget); 149 XFA_RectWidthoutMargin(rect, mgWidget);
150 } 150 }
151 CFX_Matrix mtRotate; 151 CFX_Matrix mtRotate;
152 GetRotateMatrix(mtRotate); 152 GetRotateMatrix(mtRotate);
153 if (pMatrix) { 153 if (pMatrix) {
154 mtRotate.Concat(*pMatrix); 154 mtRotate.Concat(*pMatrix);
155 } 155 }
156 DrawBorder(pGS, rtObj, rect, &mtRotate); 156 DrawBorder(pGS, rtObj, rect, &mtRotate);
157 } 157 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffpageview.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698