Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: core/fpdfapi/fpdf_page/pageint.h

Issue 1828283002: support gradients and stroke+fill (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_page/pageint.h
diff --git a/core/fpdfapi/fpdf_page/pageint.h b/core/fpdfapi/fpdf_page/pageint.h
index d254477dc337fa094c0c86e5f8f4369fcdc0b0f3..8592616dfa65eeaa5fd8261cea5f32b503863afa 100644
--- a/core/fpdfapi/fpdf_page/pageint.h
+++ b/core/fpdfapi/fpdf_page/pageint.h
@@ -383,18 +383,53 @@ class CPDF_Function {
int ninputs,
FX_FLOAT* results,
int& nresults) const;
- int CountInputs() { return m_nInputs; }
- int CountOutputs() { return m_nOutputs; }
+ int CountInputs() const { return m_nInputs; }
+ int CountOutputs() const { return m_nOutputs; }
+ FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; }
+ int GetType() const { return m_nType; }
protected:
CPDF_Function();
Tom Sepez 2016/03/24 18:07:07 nit: probably should take the type as a parameter,
caryclark 2016/03/25 20:47:56 Done.
int m_nInputs, m_nOutputs;
Tom Sepez 2016/03/24 18:07:07 nit: one per line, also blank line between methods
caryclark 2016/03/25 20:47:56 Done.
FX_FLOAT* m_pDomains;
FX_FLOAT* m_pRanges;
+ int m_nType;
Tom Sepez 2016/03/24 18:07:08 nit: I'd put this as the first member.
caryclark 2016/03/25 20:47:55 Done.
FX_BOOL Init(CPDF_Object* pObj);
Tom Sepez 2016/03/24 18:07:07 nit: move these to line 393.
caryclark 2016/03/25 20:47:55 Done.
virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0;
virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const = 0;
};
+
+class CPDF_ExpIntFunc : public CPDF_Function {
+ public:
+ CPDF_ExpIntFunc();
+ ~CPDF_ExpIntFunc() override;
+
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
+ FX_FLOAT m_Exponent;
+ FX_FLOAT* m_pBeginValues;
+ FX_FLOAT* m_pEndValues;
+ int m_nOrigOutputs;
Tom Sepez 2016/03/24 18:07:08 nit: may save 8 bytes per instance on 64 bits if t
caryclark 2016/03/25 20:47:55 Done.
+};
+
+class CPDF_StitchFunc : public CPDF_Function {
+ public:
+ CPDF_StitchFunc();
+ ~CPDF_StitchFunc() override;
+
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
+ std::vector<CPDF_Function*> m_pSubFunctions;
+ FX_FLOAT* m_pBounds;
+ FX_FLOAT* m_pEncode;
+
+ static const int kRequiredNumInputs = 1;
+};
+
class CPDF_IccProfile {
public:
CPDF_IccProfile(const uint8_t* pData, FX_DWORD dwSize);

Powered by Google App Engine
This is Rietveld 408576698