summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_imageobject.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-13 14:57:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-13 14:57:29 -0700
commit868150bd69f0f1f9472affc20deea0a9341bf22b (patch)
tree07ebd9327583ecc20ebb43b800c2f36501a80068 /core/fpdfapi/fpdf_page/cpdf_imageobject.cpp
parent82e24b1c5047076b982c073671315071760b9880 (diff)
downloadpdfium-868150bd69f0f1f9472affc20deea0a9341bf22b.tar.xz
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
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_imageobject.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_imageobject.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_imageobject.cpp b/core/fpdfapi/fpdf_page/cpdf_imageobject.cpp
index 6203d56273..e2defa8054 100644
--- a/core/fpdfapi/fpdf_page/cpdf_imageobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_imageobject.cpp
@@ -33,11 +33,27 @@ CPDF_ImageObject* CPDF_ImageObject::Clone() const {
return obj;
}
+CPDF_PageObject::Type CPDF_ImageObject::GetType() const {
+ return IMAGE;
+}
+
void CPDF_ImageObject::Transform(const CFX_Matrix& matrix) {
m_Matrix.Concat(matrix);
CalcBoundingBox();
}
+bool CPDF_ImageObject::IsImage() const {
+ return true;
+}
+
+CPDF_ImageObject* CPDF_ImageObject::AsImage() {
+ return this;
+}
+
+const CPDF_ImageObject* CPDF_ImageObject::AsImage() const {
+ return this;
+}
+
void CPDF_ImageObject::CalcBoundingBox() {
m_Left = m_Bottom = 0;
m_Right = m_Top = 1.0f;