From 868150bd69f0f1f9472affc20deea0a9341bf22b Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 13 Jun 2016 14:57:29 -0700 Subject: Make code compile with clang_use_chrome_plugin (part I) This change contains files in core/fpdfapi directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2060973002 --- core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp') diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp index de84f29865..b2eb5e642c 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp @@ -30,6 +30,10 @@ CPDF_ShadingObject* CPDF_ShadingObject::Clone() const { return obj; } +CPDF_PageObject::Type CPDF_ShadingObject::GetType() const { + return SHADING; +} + void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { if (!m_ClipPath.IsNull()) { m_ClipPath.GetModify(); @@ -43,6 +47,18 @@ void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { } } +bool CPDF_ShadingObject::IsShading() const { + return true; +} + +CPDF_ShadingObject* CPDF_ShadingObject::AsShading() { + return this; +} + +const CPDF_ShadingObject* CPDF_ShadingObject::AsShading() const { + return this; +} + void CPDF_ShadingObject::CalcBoundingBox() { if (m_ClipPath.IsNull()) { return; -- cgit v1.2.3