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

Side by Side Diff: xfa/fxgraphics/cfx_shading.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/fxgraphics/cfx_shading.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fxgraphics/cfx_shading.h" 7 #include "xfa/fxgraphics/cfx_shading.h"
8 8
9 CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint, 9 CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint,
10 const CFX_PointF& endPoint, 10 const CFX_PointF& endPoint,
11 FX_BOOL isExtendedBegin, 11 bool isExtendedBegin,
12 FX_BOOL isExtendedEnd, 12 bool isExtendedEnd,
13 const FX_ARGB beginArgb, 13 const FX_ARGB beginArgb,
14 const FX_ARGB endArgb) 14 const FX_ARGB endArgb)
15 : m_type(FX_SHADING_Axial), 15 : m_type(FX_SHADING_Axial),
16 m_beginPoint(beginPoint), 16 m_beginPoint(beginPoint),
17 m_endPoint(endPoint), 17 m_endPoint(endPoint),
18 m_beginRadius(0), 18 m_beginRadius(0),
19 m_endRadius(0), 19 m_endRadius(0),
20 m_isExtendedBegin(isExtendedBegin), 20 m_isExtendedBegin(isExtendedBegin),
21 m_isExtendedEnd(isExtendedEnd), 21 m_isExtendedEnd(isExtendedEnd),
22 m_beginArgb(beginArgb), 22 m_beginArgb(beginArgb),
23 m_endArgb(endArgb) { 23 m_endArgb(endArgb) {
24 InitArgbArray(); 24 InitArgbArray();
25 } 25 }
26 26
27 CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint, 27 CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint,
28 const CFX_PointF& endPoint, 28 const CFX_PointF& endPoint,
29 const FX_FLOAT beginRadius, 29 const FX_FLOAT beginRadius,
30 const FX_FLOAT endRadius, 30 const FX_FLOAT endRadius,
31 FX_BOOL isExtendedBegin, 31 bool isExtendedBegin,
32 FX_BOOL isExtendedEnd, 32 bool isExtendedEnd,
33 const FX_ARGB beginArgb, 33 const FX_ARGB beginArgb,
34 const FX_ARGB endArgb) 34 const FX_ARGB endArgb)
35 : m_type(FX_SHADING_Radial), 35 : m_type(FX_SHADING_Radial),
36 m_beginPoint(beginPoint), 36 m_beginPoint(beginPoint),
37 m_endPoint(endPoint), 37 m_endPoint(endPoint),
38 m_beginRadius(beginRadius), 38 m_beginRadius(beginRadius),
39 m_endRadius(endRadius), 39 m_endRadius(endRadius),
40 m_isExtendedBegin(isExtendedBegin), 40 m_isExtendedBegin(isExtendedBegin),
41 m_isExtendedEnd(isExtendedEnd), 41 m_isExtendedEnd(isExtendedEnd),
42 m_beginArgb(beginArgb), 42 m_beginArgb(beginArgb),
(...skipping 26 matching lines...) Expand all
69 int32_t a3 = static_cast<int32_t>(i * aScale); 69 int32_t a3 = static_cast<int32_t>(i * aScale);
70 int32_t r3 = static_cast<int32_t>(i * rScale); 70 int32_t r3 = static_cast<int32_t>(i * rScale);
71 int32_t g3 = static_cast<int32_t>(i * gScale); 71 int32_t g3 = static_cast<int32_t>(i * gScale);
72 int32_t b3 = static_cast<int32_t>(i * bScale); 72 int32_t b3 = static_cast<int32_t>(i * bScale);
73 73
74 // TODO(dsinclair): Add overloads for FX_ARGB. pdfium:437 74 // TODO(dsinclair): Add overloads for FX_ARGB. pdfium:437
75 m_argbArray[i] = 75 m_argbArray[i] =
76 FXARGB_TODIB(FXARGB_MAKE(a1 + a3, r1 + r3, g1 + g3, b1 + b3)); 76 FXARGB_TODIB(FXARGB_MAKE(a1 + a3, r1 + r3, g1 + g3, b1 + b3));
77 } 77 }
78 } 78 }
OLDNEW
« no previous file with comments | « xfa/fxgraphics/cfx_shading.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698