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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_colorstate.h

Issue 2294553002: Revert "Use ->() in CPDF_ColorState" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 3 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 | « BUILD.gn ('k') | core/fpdfapi/fpdf_page/cpdf_colorstate.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 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 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_
9 9
10 #include "core/fpdfapi/fpdf_page/cpdf_colorstatedata.h" 10 #include "core/fpdfapi/fpdf_page/cpdf_colorstatedata.h"
11 #include "core/fxcrt/include/cfx_count_ref.h" 11 #include "core/fxcrt/include/cfx_count_ref.h"
12 #include "core/fxcrt/include/fx_basic.h"
13 #include "core/fxcrt/include/fx_system.h"
14
15 class CPDF_Color;
16 class CPDF_ColorSpace;
17 class CPDF_Pattern;
12 18
13 class CPDF_ColorState : public CFX_CountRef<CPDF_ColorStateData> { 19 class CPDF_ColorState : public CFX_CountRef<CPDF_ColorStateData> {
20 public:
21 const CPDF_Color* GetFillColor() const {
22 const CPDF_ColorStateData* pData = GetObject();
23 return pData ? &pData->m_FillColor : nullptr;
24 }
25
26 const CPDF_Color* GetStrokeColor() const {
27 const CPDF_ColorStateData* pData = GetObject();
28 return pData ? &pData->m_StrokeColor : nullptr;
29 }
30
31 void SetFillColor(CPDF_ColorSpace* pCS, FX_FLOAT* pValue, uint32_t nValues);
32 void SetStrokeColor(CPDF_ColorSpace* pCS, FX_FLOAT* pValue, uint32_t nValues);
33 void SetFillPattern(CPDF_Pattern* pattern,
34 FX_FLOAT* pValue,
35 uint32_t nValues);
36 void SetStrokePattern(CPDF_Pattern* pattern,
37 FX_FLOAT* pValue,
38 uint32_t nValues);
39
40 private:
41 void SetColor(CPDF_Color& color,
42 uint32_t& rgb,
43 CPDF_ColorSpace* pCS,
44 FX_FLOAT* pValue,
45 uint32_t nValues);
14 }; 46 };
15 47
16 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_ 48 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/fpdf_page/cpdf_colorstate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698