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

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

Issue 2292363002: Make CPDF_GraphState have a CPDF_GraphStateData instead of inheriting (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nits 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 | « core/fpdfapi/fpdf_page/cpdf_allstates.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_graphstate.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_GRAPHSTATE_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_GRAPHSTATE_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_GRAPHSTATE_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_GRAPHSTATE_H_
9 9
10 #include "core/fxcrt/include/cfx_count_ref.h"
10 #include "core/fxge/include/cfx_graphstatedata.h" 11 #include "core/fxge/include/cfx_graphstatedata.h"
11 12
12 class CPDF_GraphState : public CFX_CountRef<CFX_GraphStateData> {}; 13 class CPDF_Array;
14
15 class CPDF_GraphState {
16 public:
17 CPDF_GraphState();
18 CPDF_GraphState(const CPDF_GraphState& that);
19 ~CPDF_GraphState();
20
21 void Emplace();
22
23 void SetLineDash(CPDF_Array* pArray, FX_FLOAT phase, FX_FLOAT scale);
24
25 FX_FLOAT GetLineWidth() const;
26 void SetLineWidth(FX_FLOAT width);
27
28 CFX_GraphStateData::LineCap GetLineCap() const;
29 void SetLineCap(CFX_GraphStateData::LineCap cap);
30
31 CFX_GraphStateData::LineJoin GetLineJoin() const;
32 void SetLineJoin(CFX_GraphStateData::LineJoin join);
33
34 FX_FLOAT GetMiterLimit() const;
35 void SetMiterLimit(FX_FLOAT limit);
36
37 // FIXME(tsepez): remove when all GraphStateData usage gone.
38 const CFX_GraphStateData* GetObject() const { return m_Ref.GetObject(); }
39
40 private:
41 CFX_CountRef<CFX_GraphStateData> m_Ref;
42 };
13 43
14 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_GRAPHSTATE_H_ 44 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_GRAPHSTATE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_allstates.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_graphstate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698