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_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 static CPDF_Function* Load(CPDF_Object* pFuncObj); | 387 static CPDF_Function* Load(CPDF_Object* pFuncObj); |
388 virtual ~CPDF_Function(); | 388 virtual ~CPDF_Function(); |
389 FX_BOOL Call(FX_FLOAT* inputs, | 389 FX_BOOL Call(FX_FLOAT* inputs, |
390 uint32_t ninputs, | 390 uint32_t ninputs, |
391 FX_FLOAT* results, | 391 FX_FLOAT* results, |
392 int& nresults) const; | 392 int& nresults) const; |
393 uint32_t CountInputs() const { return m_nInputs; } | 393 uint32_t CountInputs() const { return m_nInputs; } |
394 uint32_t CountOutputs() const { return m_nOutputs; } | 394 uint32_t CountOutputs() const { return m_nOutputs; } |
395 FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; } | 395 FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; } |
| 396 FX_FLOAT GetRange(int i) const { return m_pRanges[i]; } |
396 Type GetType() const { return m_Type; } | 397 Type GetType() const { return m_Type; } |
397 | 398 |
398 protected: | 399 protected: |
399 CPDF_Function(Type type); | 400 CPDF_Function(Type type); |
400 FX_BOOL Init(CPDF_Object* pObj); | 401 FX_BOOL Init(CPDF_Object* pObj); |
401 virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0; | 402 virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0; |
402 virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const = 0; | 403 virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const = 0; |
403 | 404 |
404 uint32_t m_nInputs; | 405 uint32_t m_nInputs; |
405 uint32_t m_nOutputs; | 406 uint32_t m_nOutputs; |
(...skipping 10 matching lines...) Expand all Loading... |
416 // CPDF_Function | 417 // CPDF_Function |
417 FX_BOOL v_Init(CPDF_Object* pObj) override; | 418 FX_BOOL v_Init(CPDF_Object* pObj) override; |
418 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; | 419 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; |
419 | 420 |
420 uint32_t m_nOrigOutputs; | 421 uint32_t m_nOrigOutputs; |
421 FX_FLOAT m_Exponent; | 422 FX_FLOAT m_Exponent; |
422 FX_FLOAT* m_pBeginValues; | 423 FX_FLOAT* m_pBeginValues; |
423 FX_FLOAT* m_pEndValues; | 424 FX_FLOAT* m_pEndValues; |
424 }; | 425 }; |
425 | 426 |
| 427 class CPDF_SampledFunc : public CPDF_Function { |
| 428 public: |
| 429 struct SampleEncodeInfo { |
| 430 FX_FLOAT encode_max; |
| 431 FX_FLOAT encode_min; |
| 432 uint32_t sizes; |
| 433 }; |
| 434 |
| 435 struct SampleDecodeInfo { |
| 436 FX_FLOAT decode_max; |
| 437 FX_FLOAT decode_min; |
| 438 }; |
| 439 |
| 440 CPDF_SampledFunc(); |
| 441 ~CPDF_SampledFunc() override; |
| 442 |
| 443 // CPDF_Function |
| 444 FX_BOOL v_Init(CPDF_Object* pObj) override; |
| 445 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; |
| 446 |
| 447 SampleEncodeInfo* m_pEncodeInfo; |
| 448 SampleDecodeInfo* m_pDecodeInfo; |
| 449 uint32_t m_nBitsPerSample; |
| 450 uint32_t m_SampleMax; |
| 451 CPDF_StreamAcc* m_pSampleStream; |
| 452 }; |
| 453 |
426 class CPDF_StitchFunc : public CPDF_Function { | 454 class CPDF_StitchFunc : public CPDF_Function { |
427 public: | 455 public: |
428 CPDF_StitchFunc(); | 456 CPDF_StitchFunc(); |
429 ~CPDF_StitchFunc() override; | 457 ~CPDF_StitchFunc() override; |
430 | 458 |
431 // CPDF_Function | 459 // CPDF_Function |
432 FX_BOOL v_Init(CPDF_Object* pObj) override; | 460 FX_BOOL v_Init(CPDF_Object* pObj) override; |
433 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; | 461 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; |
434 | 462 |
435 std::vector<CPDF_Function*> m_pSubFunctions; | 463 std::vector<CPDF_Function*> m_pSubFunctions; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 }; | 534 }; |
507 | 535 |
508 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr); | 536 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr); |
509 CFX_ByteStringC PDF_FindValueAbbreviationForTesting( | 537 CFX_ByteStringC PDF_FindValueAbbreviationForTesting( |
510 const CFX_ByteStringC& abbr); | 538 const CFX_ByteStringC& abbr); |
511 | 539 |
512 void PDF_ReplaceAbbr(CPDF_Object* pObj); | 540 void PDF_ReplaceAbbr(CPDF_Object* pObj); |
513 bool IsPathOperator(const uint8_t* buf, size_t len); | 541 bool IsPathOperator(const uint8_t* buf, size_t len); |
514 | 542 |
515 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 543 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
OLD | NEW |