Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_patterncs.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
8#define CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
9
10#include <set>
11
12#include "core/fpdfapi/page/cpdf_basedcs.h"
13#include "core/fxcrt/retain_ptr.h"
14
15class CPDF_Document;
16
17class CPDF_PatternCS final : public CPDF_BasedCS {
18 public:
20 ~CPDF_PatternCS() override;
21
22 // Called for the stock pattern, since it is not initialized via
23 // CPDF_ColorSpace::Load().
25
26 // CPDF_ColorSpace:
27 bool GetRGB(pdfium::span<const float> pBuf,
28 float* R,
29 float* G,
30 float* B) const override;
31 const CPDF_PatternCS* AsPatternCS() const override;
32 uint32_t v_Load(CPDF_Document* pDoc,
33 const CPDF_Array* pArray,
34 std::set<const CPDF_Object*>* pVisited) override;
35
36 bool GetPatternRGB(const PatternValue& value,
37 float* R,
38 float* G,
39 float* B) const;
40
41 private:
42 CPDF_PatternCS();
43};
44
45#endif // CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
static RetainPtr< CPDF_ColorSpace > GetStockCS(Family family)
void SetValueForPattern(RetainPtr< CPDF_Pattern > pattern, pdfium::span< float > values)
bool IsPatternInternal() const
CPDF_Color(const CPDF_Color &that)
CPDF_Color & operator=(const CPDF_Color &that)
void SetValueForNonPattern(std::vector< float > values)
RetainPtr< CPDF_Pattern > GetPattern() const
bool IsPattern() const
void SetColorSpace(RetainPtr< CPDF_ColorSpace > colorspace)
bool GetRGB(int *R, int *G, int *B) const
uint32_t CountComponents() const
bool IsColorSpaceRGB() const
uint32_t v_Load(CPDF_Document *pDoc, const CPDF_Array *pArray, std::set< const CPDF_Object * > *pVisited) override
~CPDF_PatternCS() override
bool GetRGB(pdfium::span< const float > pBuf, float *R, float *G, float *B) const override
void InitializeStockPattern()
bool GetPatternRGB(const PatternValue &value, float *R, float *G, float *B) const
const CPDF_PatternCS * AsPatternCS() const override
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224