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
cgdi_plus_ext.h
Go to the documentation of this file.
1// Copyright 2020 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_WIN32_CGDI_PLUS_EXT_H_
8#define CORE_FXGE_WIN32_CGDI_PLUS_EXT_H_
9
10#include <stdint.h>
11#include <windows.h>
12
13#include <vector>
14
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/span.h"
17
18class CFX_DIBBase;
20class CFX_Matrix;
21class CFX_Path;
23
25 public:
27 ~CGdiplusExt();
28
29 void Load();
30 bool IsAvailable() { return !!gdiplus_module_; }
31 bool StretchDIBits(HDC hDC,
32 RetainPtr<const CFX_DIBBase> source,
33 int dest_left,
34 int dest_top,
35 int dest_width,
36 int dest_height);
37 bool DrawPath(HDC hDC,
38 const CFX_Path& path,
39 const CFX_Matrix* pObject2Device,
40 const CFX_GraphStateData* pGraphState,
41 uint32_t fill_argb,
42 uint32_t stroke_argb,
43 const CFX_FillRenderOptions& fill_options);
44
45 pdfium::span<const FARPROC> functions() const { return gdiplus_functions_; }
46
47 private:
48 HMODULE gdiplus_module_ = nullptr;
49 std::vector<FARPROC> gdiplus_functions_;
50};
51
52#endif // CORE_FXGE_WIN32_CGDI_PLUS_EXT_H_
#define DCHECK
Definition check.h:33
#define DCHECK_EQ(x, y)
Definition check_op.h:17
FX_RECT GetInnerRect() const
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
PlatformIface * GetPlatform() const
static CFX_GEModule * Get()
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
float TransformDistance(float distance) const
CFX_PointF Transform(const CFX_PointF &point) const
bool WillScale() const
CFX_FloatRect GetBoundingBox() const
Definition cfx_path.cpp:323
bool IsRect() const
Definition cfx_path.cpp:398
bool GDI_SetDIBits(RetainPtr< const CFX_DIBBase > source, const FX_RECT &src_rect, int left, int top)
void SetBaseClip(const FX_RECT &rect) override
const DeviceType m_DeviceType
bool SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) override
void DrawLine(float x1, float y1, float x2, float y2)
bool FillRect(const FX_RECT &rect, uint32_t fill_color) override
~CGdiDeviceDriver() override
bool SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
bool GDI_StretchDIBits(RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height, const FXDIB_ResampleOptions &options)
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options) override
int GetDeviceCaps(int caps_id) const override
FX_RECT GetClipBox() const override
bool MultiplyAlpha(float alpha) override
CGdiDeviceDriver(HDC hDC, DeviceType device_type)
void RestoreState(bool bKeepSaved) override
DeviceType GetDeviceType() const override
bool MultiplyAlphaMask(RetainPtr< const CFX_DIBitmap > mask) override
void SaveState() override
bool GDI_StretchBitMask(RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height, uint32_t bitmap_color)
bool DrawCosmeticLine(const CFX_PointF &ptMoveTo, const CFX_PointF &ptLineTo, uint32_t color) override
bool IsAvailable()
pdfium::span< const FARPROC > functions() const
bool DrawPath(HDC hDC, const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_argb, uint32_t stroke_argb, const CFX_FillRenderOptions &fill_options)
bool StretchDIBits(HDC hDC, RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height)
std::unique_ptr< SystemFontInfoIface > CreateDefaultSystemFontInfo() override
void Init() override
~CWin32Platform() override
CGdiplusExt m_GdiplusExt
#define UNSAFE_TODO(...)
CFX_PTemplate< int32_t > CFX_Point
CFX_PTemplate< float > CFX_PointF
#define FXARGB_A(argb)
Definition fx_dib.h:196
uint32_t FX_COLORREF
Definition fx_dib.h:42
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:188
FX_COLORREF ArgbToColorRef(FX_ARGB argb)
Definition fx_dib.cpp:60
#define NOTREACHED_NORETURN()
Definition notreached.h:22
#define CHECK(cvref)
#define FXDC_BITS_PIXEL
#define FXDC_RENDER_CAPS
#define FXDC_PIXEL_WIDTH
#define FXDC_PIXEL_HEIGHT
#define FXRC_GET_BITS
int Height() const
int32_t bottom
int32_t right
int Width() const
int32_t top
int32_t left
constexpr FX_RECT(int l, int t, int r, int b)