diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-04 11:29:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-04 11:29:36 -0700 |
commit | 41872fa5ac7448a50f66ad56d7bde8d1aa77db4b (patch) | |
tree | 49f8162a8ed05ace693d7164f9ba116286427919 /core/fpdfapi/page/cpdf_pageobject.cpp | |
parent | bc5e6d289ed40efec2b0e03427e8fc2947bf53e3 (diff) | |
download | pdfium-41872fa5ac7448a50f66ad56d7bde8d1aa77db4b.tar.xz |
Move core/fpdfapi/fpdf_page to core/fpdfapi/page
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386423004
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobject.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobject.cpp | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobject.cpp b/core/fpdfapi/page/cpdf_pageobject.cpp new file mode 100644 index 0000000000..c0e031e7ed --- /dev/null +++ b/core/fpdfapi/page/cpdf_pageobject.cpp @@ -0,0 +1,99 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fpdfapi/page/cpdf_pageobject.h" + +CPDF_PageObject::CPDF_PageObject() {} + +CPDF_PageObject::~CPDF_PageObject() {} + +bool CPDF_PageObject::IsText() const { + return false; +} + +bool CPDF_PageObject::IsPath() const { + return false; +} + +bool CPDF_PageObject::IsImage() const { + return false; +} + +bool CPDF_PageObject::IsShading() const { + return false; +} + +bool CPDF_PageObject::IsForm() const { + return false; +} + +CPDF_TextObject* CPDF_PageObject::AsText() { + return nullptr; +} + +const CPDF_TextObject* CPDF_PageObject::AsText() const { + return nullptr; +} + +CPDF_PathObject* CPDF_PageObject::AsPath() { + return nullptr; +} + +const CPDF_PathObject* CPDF_PageObject::AsPath() const { + return nullptr; +} + +CPDF_ImageObject* CPDF_PageObject::AsImage() { + return nullptr; +} + +const CPDF_ImageObject* CPDF_PageObject::AsImage() const { + return nullptr; +} + +CPDF_ShadingObject* CPDF_PageObject::AsShading() { + return nullptr; +} + +const CPDF_ShadingObject* CPDF_PageObject::AsShading() const { + return nullptr; +} + +CPDF_FormObject* CPDF_PageObject::AsForm() { + return nullptr; +} + +const CPDF_FormObject* CPDF_PageObject::AsForm() const { + return nullptr; +} + +void CPDF_PageObject::CopyData(const CPDF_PageObject* pSrc) { + CopyStates(*pSrc); + m_Left = pSrc->m_Left; + m_Right = pSrc->m_Right; + m_Top = pSrc->m_Top; + m_Bottom = pSrc->m_Bottom; +} + +void CPDF_PageObject::TransformClipPath(CFX_Matrix& matrix) { + if (!m_ClipPath) + return; + m_ClipPath.Transform(matrix); +} + +void CPDF_PageObject::TransformGeneralState(CFX_Matrix& matrix) { + if (!m_GeneralState) + return; + m_GeneralState.GetMutableMatrix()->Concat(matrix); +} + +FX_RECT CPDF_PageObject::GetBBox(const CFX_Matrix* pMatrix) const { + CFX_FloatRect rect(m_Left, m_Bottom, m_Right, m_Top); + if (pMatrix) { + pMatrix->TransformRect(rect); + } + return rect.GetOuterRect(); +} |