| Index: core/fpdfapi/fpdf_page/include/cpdf_generalstate.h
|
| diff --git a/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h b/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h
|
| index dff8371119241d4b93e0bee77cdc0c85eebacb71..b653d640d7a82ff9b603d62bfea72b9c304f5f7d 100644
|
| --- a/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h
|
| +++ b/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h
|
| @@ -10,22 +10,67 @@
|
| #include "core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h"
|
| #include "core/fxcrt/include/fx_basic.h"
|
|
|
| -class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> {
|
| +class CPDF_GeneralState {
|
| public:
|
| + CPDF_GeneralState();
|
| + CPDF_GeneralState(const CPDF_GeneralState& that);
|
| + ~CPDF_GeneralState();
|
| +
|
| + void Emplace() { m_Ref.Emplace(); }
|
| + operator bool() const { return !!m_Ref; }
|
| +
|
| void SetRenderIntent(const CFX_ByteString& ri);
|
|
|
| - int GetBlendType() const {
|
| - const CPDF_GeneralStateData* pData = GetObject();
|
| - return pData ? pData->m_BlendType : FXDIB_BLEND_NORMAL;
|
| - }
|
| -
|
| - int GetAlpha(FX_BOOL bStroke) const {
|
| - const CPDF_GeneralStateData* pData = GetObject();
|
| - if (!pData)
|
| - return 255;
|
| - return FXSYS_round((bStroke ? pData->m_StrokeAlpha : pData->m_FillAlpha) *
|
| - 255);
|
| - }
|
| + int GetBlendType() const;
|
| + void SetBlendType(int type);
|
| +
|
| + FX_FLOAT GetFillAlpha() const;
|
| + void SetFillAlpha(FX_FLOAT alpha);
|
| +
|
| + FX_FLOAT GetStrokeAlpha() const;
|
| + void SetStrokeAlpha(FX_FLOAT alpha);
|
| +
|
| + CPDF_Object* GetSoftMask() const;
|
| + void SetSoftMask(CPDF_Object* pObject);
|
| +
|
| + CPDF_Object* GetTR() const;
|
| + void SetTR(CPDF_Object* pObject);
|
| +
|
| + CPDF_TransferFunc* GetTransferFunc() const;
|
| + void SetTransferFunc(CPDF_TransferFunc* pFunc);
|
| +
|
| + void SetBlendMode(const CFX_ByteStringC& mode);
|
| +
|
| + const FX_FLOAT* GetSMaskMatrix() const;
|
| + FX_FLOAT* GetMutableSMaskMatrix();
|
| +
|
| + bool GetFillOP() const;
|
| + void SetFillOP(bool op);
|
| +
|
| + bool GetStrokeOP() const;
|
| + void SetStrokeOP(bool op);
|
| +
|
| + int GetOPMode() const;
|
| + void SetOPMode(int mode);
|
| +
|
| + void SetBG(CPDF_Object* pObject);
|
| + void SetUCR(CPDF_Object* pObject);
|
| + void SetHT(CPDF_Object* pObject);
|
| +
|
| + void SetFlatness(FX_FLOAT flatness);
|
| + void SetSmoothness(FX_FLOAT smoothness);
|
| +
|
| + bool GetStrokeAdjust() const;
|
| + void SetStrokeAdjust(bool adjust);
|
| +
|
| + void SetAlphaSource(bool source);
|
| + void SetTextKnockout(bool knockout);
|
| +
|
| + void SetMatrix(const CFX_Matrix& matrix);
|
| + CFX_Matrix* GetMutableMatrix();
|
| +
|
| + private:
|
| + CFX_CountRef<CPDF_GeneralStateData> m_Ref;
|
| };
|
|
|
| #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
|
|
|