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

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

Issue 1830323006: Remove FX_DWORD from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « xfa/fxfa/app/xfa_ffpageview.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.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 "xfa/fxfa/app/xfa_ffpath.h" 7 #include "xfa/fxfa/app/xfa_ffpath.h"
8 8
9 #include "xfa/fxfa/app/xfa_ffapp.h" 9 #include "xfa/fxfa/app/xfa_ffapp.h"
10 #include "xfa/fxfa/app/xfa_ffdoc.h" 10 #include "xfa/fxfa/app/xfa_ffdoc.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 rect.Inflate(fHalfWidth, fHalfWidth); 44 rect.Inflate(fHalfWidth, fHalfWidth);
45 break; 45 break;
46 case XFA_ATTRIBUTEENUM_Right: 46 case XFA_ATTRIBUTEENUM_Right:
47 rect.Deflate(fHalfWidth, fHalfWidth); 47 rect.Deflate(fHalfWidth, fHalfWidth);
48 break; 48 break;
49 } 49 }
50 } 50 }
51 } 51 }
52 void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, 52 void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS,
53 CFX_Matrix* pMatrix, 53 CFX_Matrix* pMatrix,
54 FX_DWORD dwStatus, 54 uint32_t dwStatus,
55 int32_t iRotate) { 55 int32_t iRotate) {
56 if (!IsMatchVisibleStatus(dwStatus)) { 56 if (!IsMatchVisibleStatus(dwStatus)) {
57 return; 57 return;
58 } 58 }
59 CXFA_Value value = m_pDataAcc->GetFormValue(); 59 CXFA_Value value = m_pDataAcc->GetFormValue();
60 if (!value) { 60 if (!value) {
61 return; 61 return;
62 } 62 }
63 CXFA_Line lineObj = value.GetLine(); 63 CXFA_Line lineObj = value.GetLine();
64 FX_ARGB lineColor = 0xFF000000; 64 FX_ARGB lineColor = 0xFF000000;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 pGS->SetStrokeColor(&color); 101 pGS->SetStrokeColor(&color);
102 pGS->SetLineCap(XFA_LineCapToFXGE(iCap)); 102 pGS->SetLineCap(XFA_LineCapToFXGE(iCap));
103 pGS->StrokePath(&linePath, &mtRotate); 103 pGS->StrokePath(&linePath, &mtRotate);
104 pGS->RestoreGraphState(); 104 pGS->RestoreGraphState();
105 } 105 }
106 CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) 106 CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
107 : CXFA_FFDraw(pPageView, pDataAcc) {} 107 : CXFA_FFDraw(pPageView, pDataAcc) {}
108 CXFA_FFArc::~CXFA_FFArc() {} 108 CXFA_FFArc::~CXFA_FFArc() {}
109 void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, 109 void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS,
110 CFX_Matrix* pMatrix, 110 CFX_Matrix* pMatrix,
111 FX_DWORD dwStatus, 111 uint32_t dwStatus,
112 int32_t iRotate) { 112 int32_t iRotate) {
113 if (!IsMatchVisibleStatus(dwStatus)) { 113 if (!IsMatchVisibleStatus(dwStatus)) {
114 return; 114 return;
115 } 115 }
116 CXFA_Value value = m_pDataAcc->GetFormValue(); 116 CXFA_Value value = m_pDataAcc->GetFormValue();
117 if (!value) { 117 if (!value) {
118 return; 118 return;
119 } 119 }
120 CXFA_Arc arcObj = value.GetArc(); 120 CXFA_Arc arcObj = value.GetArc();
121 CFX_Matrix mtRotate; 121 CFX_Matrix mtRotate;
122 GetRotateMatrix(mtRotate); 122 GetRotateMatrix(mtRotate);
123 if (pMatrix) { 123 if (pMatrix) {
124 mtRotate.Concat(*pMatrix); 124 mtRotate.Concat(*pMatrix);
125 } 125 }
126 CFX_RectF rtArc; 126 CFX_RectF rtArc;
127 GetRectWithoutRotate(rtArc); 127 GetRectWithoutRotate(rtArc);
128 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) { 128 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
129 XFA_RectWidthoutMargin(rtArc, mgWidget); 129 XFA_RectWidthoutMargin(rtArc, mgWidget);
130 } 130 }
131 DrawBorder(pGS, arcObj, rtArc, &mtRotate); 131 DrawBorder(pGS, arcObj, rtArc, &mtRotate);
132 } 132 }
133 CXFA_FFRectangle::CXFA_FFRectangle(CXFA_FFPageView* pPageView, 133 CXFA_FFRectangle::CXFA_FFRectangle(CXFA_FFPageView* pPageView,
134 CXFA_WidgetAcc* pDataAcc) 134 CXFA_WidgetAcc* pDataAcc)
135 : CXFA_FFDraw(pPageView, pDataAcc) {} 135 : CXFA_FFDraw(pPageView, pDataAcc) {}
136 CXFA_FFRectangle::~CXFA_FFRectangle() {} 136 CXFA_FFRectangle::~CXFA_FFRectangle() {}
137 void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, 137 void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS,
138 CFX_Matrix* pMatrix, 138 CFX_Matrix* pMatrix,
139 FX_DWORD dwStatus, 139 uint32_t dwStatus,
140 int32_t iRotate) { 140 int32_t iRotate) {
141 if (!IsMatchVisibleStatus(dwStatus)) { 141 if (!IsMatchVisibleStatus(dwStatus)) {
142 return; 142 return;
143 } 143 }
144 CXFA_Value value = m_pDataAcc->GetFormValue(); 144 CXFA_Value value = m_pDataAcc->GetFormValue();
145 if (!value) { 145 if (!value) {
146 return; 146 return;
147 } 147 }
148 CXFA_Rectangle rtObj = value.GetRectangle(); 148 CXFA_Rectangle rtObj = value.GetRectangle();
149 CFX_RectF rect; 149 CFX_RectF rect;
150 GetRectWithoutRotate(rect); 150 GetRectWithoutRotate(rect);
151 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) { 151 if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
152 XFA_RectWidthoutMargin(rect, mgWidget); 152 XFA_RectWidthoutMargin(rect, mgWidget);
153 } 153 }
154 CFX_Matrix mtRotate; 154 CFX_Matrix mtRotate;
155 GetRotateMatrix(mtRotate); 155 GetRotateMatrix(mtRotate);
156 if (pMatrix) { 156 if (pMatrix) {
157 mtRotate.Concat(*pMatrix); 157 mtRotate.Concat(*pMatrix);
158 } 158 }
159 DrawBorder(pGS, rtObj, rect, &mtRotate); 159 DrawBorder(pGS, rtObj, rect, &mtRotate);
160 } 160 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffpageview.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698