| OLD | NEW |
| 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_ffwidget.h" | 7 #include "xfa/fxfa/app/xfa_ffwidget.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 } | 1303 } |
| 1304 path.LineTo(cp.x, cp.y); | 1304 path.LineTo(cp.x, cp.y); |
| 1305 path.LineTo(cp1.x + fRadius1 * sx + offsetX, | 1305 path.LineTo(cp1.x + fRadius1 * sx + offsetX, |
| 1306 cp1.y + fRadius1 * sy + offsetY); | 1306 cp1.y + fRadius1 * sy + offsetY); |
| 1307 } | 1307 } |
| 1308 } | 1308 } |
| 1309 static void XFA_BOX_GetFillPath(CXFA_Box box, | 1309 static void XFA_BOX_GetFillPath(CXFA_Box box, |
| 1310 const CXFA_StrokeArray& strokes, | 1310 const CXFA_StrokeArray& strokes, |
| 1311 CFX_RectF rtWidget, | 1311 CFX_RectF rtWidget, |
| 1312 CFX_Path& fillPath, | 1312 CFX_Path& fillPath, |
| 1313 FX_WORD dwFlags) { | 1313 uint16_t dwFlags) { |
| 1314 if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) { | 1314 if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) { |
| 1315 CXFA_Edge edge = box.GetEdge(0); | 1315 CXFA_Edge edge = box.GetEdge(0); |
| 1316 FX_FLOAT fThickness = edge.GetThickness(); | 1316 FX_FLOAT fThickness = edge.GetThickness(); |
| 1317 if (fThickness < 0) { | 1317 if (fThickness < 0) { |
| 1318 fThickness = 0; | 1318 fThickness = 0; |
| 1319 } | 1319 } |
| 1320 FX_FLOAT fHalf = fThickness / 2; | 1320 FX_FLOAT fHalf = fThickness / 2; |
| 1321 int32_t iHand = box.GetHand(); | 1321 int32_t iHand = box.GetHand(); |
| 1322 if (iHand == XFA_ATTRIBUTEENUM_Left) { | 1322 if (iHand == XFA_ATTRIBUTEENUM_Left) { |
| 1323 rtWidget.Inflate(fHalf, fHalf); | 1323 rtWidget.Inflate(fHalf, fHalf); |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 iType != XFA_ELEMENT_Rectangle) { | 1956 iType != XFA_ELEMENT_Rectangle) { |
| 1957 return; | 1957 return; |
| 1958 } | 1958 } |
| 1959 CXFA_StrokeArray strokes; | 1959 CXFA_StrokeArray strokes; |
| 1960 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { | 1960 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { |
| 1961 box.GetStrokes(strokes); | 1961 box.GetStrokes(strokes); |
| 1962 } | 1962 } |
| 1963 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 1963 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 1964 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 1964 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 1965 } | 1965 } |
| OLD | NEW |