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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_path.cpp

Issue 2386423004: Move core/fpdfapi/fpdf_page to core/fpdfapi/page (Closed)
Patch Set: Rebase to master Created 4 years, 2 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_path.h ('k') | core/fpdfapi/fpdf_page/cpdf_pathobject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "core/fpdfapi/fpdf_page/cpdf_path.h"
8
9 CPDF_Path::CPDF_Path() {}
10
11 CPDF_Path::CPDF_Path(const CPDF_Path& that) : m_Ref(that.m_Ref) {}
12
13 CPDF_Path::~CPDF_Path() {}
14
15 int CPDF_Path::GetPointCount() const {
16 return m_Ref.GetObject()->GetPointCount();
17 }
18
19 void CPDF_Path::SetPointCount(int count) {
20 m_Ref.GetPrivateCopy()->SetPointCount(count);
21 }
22
23 const FX_PATHPOINT* CPDF_Path::GetPoints() const {
24 return m_Ref.GetObject()->GetPoints();
25 }
26
27 FX_PATHPOINT* CPDF_Path::GetMutablePoints() {
28 return m_Ref.GetPrivateCopy()->GetPoints();
29 }
30
31 int CPDF_Path::GetFlag(int index) const {
32 return m_Ref.GetObject()->GetFlag(index);
33 }
34
35 FX_FLOAT CPDF_Path::GetPointX(int index) const {
36 return m_Ref.GetObject()->GetPointX(index);
37 }
38
39 FX_FLOAT CPDF_Path::GetPointY(int index) const {
40 return m_Ref.GetObject()->GetPointY(index);
41 }
42
43 CFX_FloatRect CPDF_Path::GetBoundingBox() const {
44 return m_Ref.GetObject()->GetBoundingBox();
45 }
46
47 CFX_FloatRect CPDF_Path::GetBoundingBox(FX_FLOAT line_width,
48 FX_FLOAT miter_limit) const {
49 return m_Ref.GetObject()->GetBoundingBox(line_width, miter_limit);
50 }
51
52 FX_BOOL CPDF_Path::IsRect() const {
53 return m_Ref.GetObject()->IsRect();
54 }
55
56 void CPDF_Path::Transform(const CFX_Matrix* pMatrix) {
57 m_Ref.GetPrivateCopy()->Transform(pMatrix);
58 }
59
60 void CPDF_Path::Append(const CPDF_Path& other, const CFX_Matrix* pMatrix) {
61 m_Ref.GetPrivateCopy()->Append(other.GetObject(), pMatrix);
62 }
63
64 void CPDF_Path::Append(const CFX_PathData* pData, const CFX_Matrix* pMatrix) {
65 m_Ref.GetPrivateCopy()->Append(pData, pMatrix);
66 }
67
68 void CPDF_Path::AppendRect(FX_FLOAT left,
69 FX_FLOAT bottom,
70 FX_FLOAT right,
71 FX_FLOAT top) {
72 m_Ref.GetPrivateCopy()->AppendRect(left, bottom, right, top);
73 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_path.h ('k') | core/fpdfapi/fpdf_page/cpdf_pathobject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698