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
cfx_imagerenderer.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_FXGE_DIB_CFX_IMAGERENDERER_H_
8#define CORE_FXGE_DIB_CFX_IMAGERENDERER_H_
9
10#include <memory>
11
12#include "core/fxcrt/fx_coordinates.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "core/fxcrt/unowned_ptr.h"
15#include "core/fxge/dib/cfx_bitmapcomposer.h"
16
17class CFX_DIBBase;
18class CFX_DIBitmap;
22
24 public:
25 CFX_ImageRenderer(const RetainPtr<CFX_DIBitmap>& pDevice,
26 const CFX_ClipRgn* pClipRgn,
27 RetainPtr<const CFX_DIBBase> source,
28 float alpha,
29 uint32_t mask_color,
30 const CFX_Matrix& matrix,
31 const FXDIB_ResampleOptions& options,
32 bool bRgbByteOrder);
34
35 bool Continue(PauseIndicatorIface* pPause);
36
37 private:
38 enum class State : uint8_t { kInitial = 0, kStretching, kTransforming };
39
40 RetainPtr<CFX_DIBitmap> const m_pDevice;
41 UnownedPtr<const CFX_ClipRgn> const m_pClipRgn;
42 const CFX_Matrix m_Matrix;
43 std::unique_ptr<CFX_ImageTransformer> m_pTransformer;
44 std::unique_ptr<CFX_ImageStretcher> m_Stretcher;
45 CFX_BitmapComposer m_Composer;
46 FX_RECT m_ClipBox;
47 const float m_Alpha;
48 uint32_t m_MaskColor;
49 State m_State = State::kInitial;
50 const bool m_bRgbByteOrder;
51};
52
53#endif // CORE_FXGE_DIB_CFX_IMAGERENDERER_H_
bool Create(int width, int height, FXDIB_Format format, RetainPtr< CFX_DIBitmap > pBackdropBitmap)
FX_RECT GetOuterRect() const
bool Continue(PauseIndicatorIface *pPause)
CFX_ImageRenderer(const RetainPtr< CFX_DIBitmap > &pDevice, const CFX_ClipRgn *pClipRgn, RetainPtr< const CFX_DIBBase > source, float alpha, uint32_t mask_color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, bool bRgbByteOrder)
CFX_Matrix & operator=(const CFX_Matrix &other)=default
void Translate(int32_t x, int32_t y)
CFX_FloatRect GetUnitRect() const
void Translate(float x, float y)
void Transform(const CFX_Matrix &matrix)
Definition cfx_path.cpp:392
void AppendRect(float left, float bottom, float right, float top)
Definition cfx_path.cpp:309
bool IsPattern() const
static CPDF_DocPageData * FromDocument(const CPDF_Document *pDoc)
float GetStrokeAlpha() const
BlendMode GetBlendType() const
CPDF_ImageRenderer(CPDF_RenderStatus *pStatus)
bool Start(RetainPtr< CFX_DIBBase > pDIBBase, FX_ARGB bitmap_argb, const CFX_Matrix &mtImage2Device, const FXDIB_ResampleOptions &options, bool bStdCS)
bool Continue(PauseIndicatorIface *pPause)
bool Start(CPDF_ImageObject *pImageObject, const CFX_Matrix &mtObj2Device, bool bStdCS, BlendMode blendType)
CPDF_Document * GetDocument() const override
Definition cpdf_page.cpp:51
const Options & GetOptions() const
bool CheckOCGDictVisible(const CPDF_Dictionary *pOC) const
bool ColorModeIs(Type mode) const
void SetOptions(const CPDF_RenderOptions &options)
void SetStdCS(bool bStdCS)
void Initialize(const CPDF_RenderStatus *pParentStatus, const CPDF_GraphicStates *pInitialStates)
#define FXARGB_MUL_ALPHA(argb, alpha)
Definition fx_dib.h:128
BlendMode
Definition fx_dib.h:49
#define FXARGB_B(argb)
Definition fx_dib.h:127
#define FXARGB_G(argb)
Definition fx_dib.h:126
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118
#define FXARGB_R(argb)
Definition fx_dib.h:125
FXDIB_Format
Definition fx_dib.h:19
int FXSYS_roundf(float f)
Definition fx_system.cpp:92
#define FXRC_BLEND_MODE
bool bInterpolateBilinear
Definition fx_dib.h:41
int Height() const
int32_t bottom
int32_t right
int Width() const
int32_t top
int32_t left
bool IsEmpty() const