| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ |
| 9 | 9 |
| 10 #include "../fxge/fx_ge.h" | 10 #include "../fxge/fx_ge.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void Append(CPDF_Path src, const CFX_AffineMa
trix* pMatrix) | 81 void Append(CPDF_Path src, const CFX_AffineMa
trix* pMatrix) |
| 82 { | 82 { |
| 83 m_pObject->Append(src.m_pObject, pMatrix); | 83 m_pObject->Append(src.m_pObject, pMatrix); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void AppendRect(FX_FLOAT left, FX_FLOAT botto
m, FX_FLOAT right, FX_FLOAT top) | 86 void AppendRect(FX_FLOAT left, FX_FLOAT botto
m, FX_FLOAT right, FX_FLOAT top) |
| 87 { | 87 { |
| 88 m_pObject->AppendRect(left, bottom, right, top); | 88 m_pObject->AppendRect(left, bottom, right, top); |
| 89 } | 89 } |
| 90 | 90 |
| 91 FX_BOOL» » » » IsRect() const | 91 bool» » » » IsRect() const |
| 92 { | 92 { |
| 93 return m_pObject->IsRect(); | 93 return m_pObject->IsRect(); |
| 94 } | 94 } |
| 95 }; | 95 }; |
| 96 class CPDF_ClipPathData | 96 class CPDF_ClipPathData |
| 97 { | 97 { |
| 98 public: | 98 public: |
| 99 | 99 |
| 100 CPDF_ClipPathData(); | 100 CPDF_ClipPathData(); |
| 101 | 101 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return m_pObject->m_TextCount; | 140 return m_pObject->m_TextCount; |
| 141 } | 141 } |
| 142 | 142 |
| 143 CPDF_TextObject* GetText(int i) const | 143 CPDF_TextObject* GetText(int i) const |
| 144 { | 144 { |
| 145 return m_pObject->m_pTextList[i]; | 145 return m_pObject->m_pTextList[i]; |
| 146 } | 146 } |
| 147 | 147 |
| 148 CFX_FloatRect GetClipBox() const; | 148 CFX_FloatRect GetClipBox() const; |
| 149 | 149 |
| 150 void» » » » AppendPath(CPDF_Path path, int type, FX_
BOOL bAutoMerge); | 150 void» » » » AppendPath(CPDF_Path path, int type, boo
l bAutoMerge); |
| 151 | 151 |
| 152 void DeletePath(int layer_index); | 152 void DeletePath(int layer_index); |
| 153 | 153 |
| 154 void AppendTexts(CPDF_TextObject** pTexts, in
t count); | 154 void AppendTexts(CPDF_TextObject** pTexts, in
t count); |
| 155 | 155 |
| 156 void Transform(const CFX_AffineMatrix& matrix
); | 156 void Transform(const CFX_AffineMatrix& matrix
); |
| 157 }; | 157 }; |
| 158 class CPDF_ColorStateData | 158 class CPDF_ColorStateData |
| 159 { | 159 { |
| 160 public: | 160 public: |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 FX_FLOAT m_FillAlpha; | 285 FX_FLOAT m_FillAlpha; |
| 286 | 286 |
| 287 CPDF_Object* m_pTR; | 287 CPDF_Object* m_pTR; |
| 288 | 288 |
| 289 CPDF_TransferFunc* m_pTransferFunc; | 289 CPDF_TransferFunc* m_pTransferFunc; |
| 290 | 290 |
| 291 CFX_Matrix m_Matrix; | 291 CFX_Matrix m_Matrix; |
| 292 | 292 |
| 293 int m_RenderIntent; | 293 int m_RenderIntent; |
| 294 | 294 |
| 295 FX_BOOL» » » » m_StrokeAdjust; | 295 bool» » » » m_StrokeAdjust; |
| 296 | 296 |
| 297 FX_BOOL» » » » m_AlphaSource; | 297 bool» » » » m_AlphaSource; |
| 298 | 298 |
| 299 FX_BOOL» » » » m_TextKnockout; | 299 bool» » » » m_TextKnockout; |
| 300 | 300 |
| 301 FX_BOOL» » » » m_StrokeOP; | 301 bool» » » » m_StrokeOP; |
| 302 | 302 |
| 303 FX_BOOL» » » » m_FillOP; | 303 bool» » » » m_FillOP; |
| 304 | 304 |
| 305 int m_OPMode; | 305 int m_OPMode; |
| 306 | 306 |
| 307 CPDF_Object* m_pBG; | 307 CPDF_Object* m_pBG; |
| 308 | 308 |
| 309 CPDF_Object* m_pUCR; | 309 CPDF_Object* m_pUCR; |
| 310 | 310 |
| 311 CPDF_Object* m_pHT; | 311 CPDF_Object* m_pHT; |
| 312 | 312 |
| 313 FX_FLOAT m_Flatness; | 313 FX_FLOAT m_Flatness; |
| 314 | 314 |
| 315 FX_FLOAT m_Smoothness; | 315 FX_FLOAT m_Smoothness; |
| 316 }; | 316 }; |
| 317 class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> | 317 class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> |
| 318 { | 318 { |
| 319 public: | 319 public: |
| 320 | 320 |
| 321 void SetRenderIntent(const CFX_ByteString& ri
); | 321 void SetRenderIntent(const CFX_ByteString& ri
); |
| 322 | 322 |
| 323 int GetBlendType() const | 323 int GetBlendType() const |
| 324 { | 324 { |
| 325 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL; | 325 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL; |
| 326 } | 326 } |
| 327 | 327 |
| 328 int»» » » » GetAlpha(FX_BOOL bStroke) const | 328 int»» » » » GetAlpha(bool bStroke) const |
| 329 { | 329 { |
| 330 return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_p
Object->m_FillAlpha) * 255) : 255; | 330 return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_p
Object->m_FillAlpha) * 255) : 255; |
| 331 } | 331 } |
| 332 }; | 332 }; |
| 333 class CPDF_ContentMarkItem | 333 class CPDF_ContentMarkItem |
| 334 { | 334 { |
| 335 public: | 335 public: |
| 336 | 336 |
| 337 typedef enum { | 337 typedef enum { |
| 338 None, | 338 None, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 355 inline ParamType GetParamType() const | 355 inline ParamType GetParamType() const |
| 356 { | 356 { |
| 357 return m_ParamType; | 357 return m_ParamType; |
| 358 } | 358 } |
| 359 | 359 |
| 360 inline void* GetParam() const | 360 inline void* GetParam() const |
| 361 { | 361 { |
| 362 return m_pParam; | 362 return m_pParam; |
| 363 } | 363 } |
| 364 | 364 |
| 365 inline FX_BOOL» » HasMCID() const; | 365 inline bool»» HasMCID() const; |
| 366 | 366 |
| 367 inline void SetName(const CFX_ByteString& name) | 367 inline void SetName(const CFX_ByteString& name) |
| 368 { | 368 { |
| 369 m_MarkName = name; | 369 m_MarkName = name; |
| 370 } | 370 } |
| 371 | 371 |
| 372 inline void SetParam(ParamType type, void* param) | 372 inline void SetParam(ParamType type, void* param) |
| 373 { | 373 { |
| 374 m_ParamType = type; | 374 m_ParamType = type; |
| 375 m_pParam = param; | 375 m_pParam = param; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 395 return m_Marks.GetSize(); | 395 return m_Marks.GetSize(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 inline CPDF_ContentMarkItem& GetItem(int index) const | 398 inline CPDF_ContentMarkItem& GetItem(int index) const |
| 399 { | 399 { |
| 400 return m_Marks[index]; | 400 return m_Marks[index]; |
| 401 } | 401 } |
| 402 | 402 |
| 403 int GetMCID() const; | 403 int GetMCID() const; |
| 404 | 404 |
| 405 void» » » » AddMark(const CFX_ByteString& name, CPDF
_Dictionary* pDict, FX_BOOL bDictNeedClone); | 405 void» » » » AddMark(const CFX_ByteString& name, CPDF
_Dictionary* pDict, bool bDictNeedClone); |
| 406 | 406 |
| 407 void DeleteLastMark(); | 407 void DeleteLastMark(); |
| 408 private: | 408 private: |
| 409 | 409 |
| 410 CFX_ObjectArray<CPDF_ContentMarkItem> m_Marks; | 410 CFX_ObjectArray<CPDF_ContentMarkItem> m_Marks; |
| 411 }; | 411 }; |
| 412 class CPDF_ContentMark : public CFX_CountRef<CPDF_ContentMarkData> | 412 class CPDF_ContentMark : public CFX_CountRef<CPDF_ContentMarkData> |
| 413 { | 413 { |
| 414 public: | 414 public: |
| 415 | 415 |
| 416 int GetMCID() const | 416 int GetMCID() const |
| 417 { | 417 { |
| 418 return m_pObject ? m_pObject->GetMCID() : -1; | 418 return m_pObject ? m_pObject->GetMCID() : -1; |
| 419 } | 419 } |
| 420 | 420 |
| 421 FX_BOOL» » » » HasMark(const CFX_ByteStringC& mark) con
st; | 421 bool» » » » HasMark(const CFX_ByteStringC& mark) con
st; |
| 422 | 422 |
| 423 FX_BOOL» » » » LookupMark(const CFX_ByteStringC& mark,
CPDF_Dictionary*& pDict) const; | 423 bool» » » » LookupMark(const CFX_ByteStringC& mark,
CPDF_Dictionary*& pDict) const; |
| 424 }; | 424 }; |
| 425 | 425 |
| 426 #define PDFPAGE_TEXT 1 | 426 #define PDFPAGE_TEXT 1 |
| 427 #define PDFPAGE_PATH 2 | 427 #define PDFPAGE_PATH 2 |
| 428 #define PDFPAGE_IMAGE 3 | 428 #define PDFPAGE_IMAGE 3 |
| 429 #define PDFPAGE_SHADING 4 | 429 #define PDFPAGE_SHADING 4 |
| 430 #define PDFPAGE_FORM 5 | 430 #define PDFPAGE_FORM 5 |
| 431 | 431 |
| 432 class CPDF_GraphicStates | 432 class CPDF_GraphicStates |
| 433 { | 433 { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 454 virtual ~CPDF_PageObject(); | 454 virtual ~CPDF_PageObject(); |
| 455 | 455 |
| 456 CPDF_PageObject* Clone() const; | 456 CPDF_PageObject* Clone() const; |
| 457 | 457 |
| 458 void Copy(const CPDF_PageObject* pSrcObject); | 458 void Copy(const CPDF_PageObject* pSrcObject); |
| 459 | 459 |
| 460 virtual void Transform(const CFX_AffineMatrix& matrix) = 0; | 460 virtual void Transform(const CFX_AffineMatrix& matrix) = 0; |
| 461 | 461 |
| 462 void RemoveClipPath(); | 462 void RemoveClipPath(); |
| 463 | 463 |
| 464 void» » » » AppendClipPath(CPDF_Path path, int type,
FX_BOOL bAutoMerge); | 464 void» » » » AppendClipPath(CPDF_Path path, int type,
bool bAutoMerge); |
| 465 | 465 |
| 466 void CopyClipPath(CPDF_PageObject* pObj); | 466 void CopyClipPath(CPDF_PageObject* pObj); |
| 467 | 467 |
| 468 void TransformClipPath(CFX_AffineMatrix& matr
ix); | 468 void TransformClipPath(CFX_AffineMatrix& matr
ix); |
| 469 | 469 |
| 470 void TransformGeneralState(CFX_AffineMatrix&
matrix); | 470 void TransformGeneralState(CFX_AffineMatrix&
matrix); |
| 471 | 471 |
| 472 void SetColorState(CPDF_ColorState state) | 472 void SetColorState(CPDF_ColorState state) |
| 473 { | 473 { |
| 474 m_ColorState = state; | 474 m_ColorState = state; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 622 |
| 623 virtual ~CPDF_PathObject() {} | 623 virtual ~CPDF_PathObject() {} |
| 624 void Transform(const CFX_AffineMatrix& maxtrix) override; | 624 void Transform(const CFX_AffineMatrix& maxtrix) override; |
| 625 | 625 |
| 626 void SetGraphState(CPDF_GraphState GraphState
); | 626 void SetGraphState(CPDF_GraphState GraphState
); |
| 627 | 627 |
| 628 CPDF_Path m_Path; | 628 CPDF_Path m_Path; |
| 629 | 629 |
| 630 int m_FillType; | 630 int m_FillType; |
| 631 | 631 |
| 632 FX_BOOL» » » » m_bStroke; | 632 bool» » » » m_bStroke; |
| 633 | 633 |
| 634 CFX_AffineMatrix m_Matrix; | 634 CFX_AffineMatrix m_Matrix; |
| 635 | 635 |
| 636 | 636 |
| 637 void CalcBoundingBox(); | 637 void CalcBoundingBox(); |
| 638 | 638 |
| 639 protected: | 639 protected: |
| 640 void CopyData(const CPDF_PageObject* pSrcObject) override; | 640 void CopyData(const CPDF_PageObject* pSrcObject) override; |
| 641 }; | 641 }; |
| 642 | 642 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 | 694 |
| 695 CFX_AffineMatrix m_FormMatrix; | 695 CFX_AffineMatrix m_FormMatrix; |
| 696 | 696 |
| 697 void CalcBoundingBox(); | 697 void CalcBoundingBox(); |
| 698 | 698 |
| 699 protected: | 699 protected: |
| 700 void CopyData(const CPDF_PageObject* pSrcObject) override; | 700 void CopyData(const CPDF_PageObject* pSrcObject) override; |
| 701 }; | 701 }; |
| 702 | 702 |
| 703 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ | 703 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ |
| OLD | NEW |