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_devicebuffer.h
Go to the documentation of this file.
1// Copyright 2016 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_RENDER_CPDF_DEVICEBUFFER_H_
8#define CORE_FPDFAPI_RENDER_CPDF_DEVICEBUFFER_H_
9
10#include "core/fxcrt/fx_coordinates.h"
11#include "core/fxcrt/retain_ptr.h"
12#include "core/fxcrt/unowned_ptr.h"
13
14class CFX_DIBitmap;
16class CPDF_PageObject;
18
20 public:
22 const FX_RECT& rect,
23 int max_dpi,
24 bool scale);
25
27 CFX_RenderDevice* pDevice,
28 const FX_RECT& rect,
29 const CPDF_PageObject* pObj,
30 int max_dpi);
32
33 // On success, the returned bitmap will already have its buffer allocated.
34 // On failure, the returned result is null.
35 [[nodiscard]] RetainPtr<CFX_DIBitmap> Initialize();
36 void OutputToDevice();
37 const CFX_Matrix& GetMatrix() const { return m_Matrix; }
38
39 private:
40 UnownedPtr<CFX_RenderDevice> const m_pDevice;
41 UnownedPtr<CPDF_RenderContext> const m_pContext;
42 UnownedPtr<const CPDF_PageObject> const m_pObject;
43 RetainPtr<CFX_DIBitmap> const m_pBitmap;
44 const FX_RECT m_Rect;
45 const CFX_Matrix m_Matrix;
46};
47
48#endif // CORE_FPDFAPI_RENDER_CPDF_DEVICEBUFFER_H_
CFX_FloatRect(const FX_RECT &rect)
FX_RECT GetOuterRect() const
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
void Translate(int32_t x, int32_t y)
void Scale(float sx, float sy)
int GetDeviceCaps(int id) const
CPDF_DeviceBuffer(CPDF_RenderContext *pContext, CFX_RenderDevice *pDevice, const FX_RECT &rect, const CPDF_PageObject *pObj, int max_dpi)
const CFX_Matrix & GetMatrix() const
static CFX_Matrix CalculateMatrix(CFX_RenderDevice *pDevice, const FX_RECT &rect, int max_dpi, bool scale)
RetainPtr< CFX_DIBitmap > Initialize()
#define FXDC_RENDER_CAPS
#define FXDC_PIXEL_WIDTH
#define FXDC_VERT_SIZE
#define FXDC_PIXEL_HEIGHT
#define FXDC_HORZ_SIZE
#define FXRC_GET_BITS
FX_RECT(const FX_RECT &that)=default
int32_t top
int32_t left