| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_PAGE_CPDF_PSENGINE_H_ | 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ |
| 8 #define CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ | 8 #define CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 class CPDF_PSEngine { | 81 class CPDF_PSEngine { |
| 82 public: | 82 public: |
| 83 CPDF_PSEngine(); | 83 CPDF_PSEngine(); |
| 84 ~CPDF_PSEngine(); | 84 ~CPDF_PSEngine(); |
| 85 | 85 |
| 86 bool Parse(const FX_CHAR* str, int size); | 86 bool Parse(const FX_CHAR* str, int size); |
| 87 bool Execute(); | 87 bool Execute(); |
| 88 bool DoOperator(PDF_PSOP op); | 88 bool DoOperator(PDF_PSOP op); |
| 89 void Reset() { m_StackCount = 0; } | 89 void Reset() { m_StackCount = 0; } |
| 90 void Push(FX_FLOAT value); | 90 void Push(FX_FLOAT value); |
| 91 void Push(int value) { Push((FX_FLOAT)value); } | |
| 92 FX_FLOAT Pop(); | 91 FX_FLOAT Pop(); |
| 93 uint32_t GetStackSize() const { return m_StackCount; } | 92 uint32_t GetStackSize() const { return m_StackCount; } |
| 94 | 93 |
| 95 private: | 94 private: |
| 96 FX_FLOAT m_Stack[PSENGINE_STACKSIZE]; | 95 FX_FLOAT m_Stack[PSENGINE_STACKSIZE]; |
| 97 uint32_t m_StackCount; | 96 uint32_t m_StackCount; |
| 98 CPDF_PSProc m_MainProc; | 97 CPDF_PSProc m_MainProc; |
| 99 }; | 98 }; |
| 100 | 99 |
| 101 #endif // CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ | 100 #endif // CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ |
| OLD | NEW |