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_cliprgn.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_FXGE_CFX_CLIPRGN_H_
8#define CORE_FXGE_CFX_CLIPRGN_H_
9
10#include "core/fxcrt/fx_coordinates.h"
11#include "core/fxcrt/retain_ptr.h"
12
13class CFX_DIBitmap;
14
16 public:
17 enum ClipType : bool { kRectI, kMaskF };
18
19 CFX_ClipRgn(int device_width, int device_height);
22
23 ClipType GetType() const { return m_Type; }
24 const FX_RECT& GetBox() const { return m_Box; }
25 RetainPtr<CFX_DIBitmap> GetMask() const { return m_Mask; }
26
27 void IntersectRect(const FX_RECT& rect);
28 void IntersectMaskF(int left, int top, RetainPtr<CFX_DIBitmap> Mask);
29
30 private:
31 void IntersectMaskRect(FX_RECT rect,
32 FX_RECT mask_rect,
33 RetainPtr<CFX_DIBitmap> pOldMask);
34
35 ClipType m_Type = kRectI;
36 FX_RECT m_Box;
37 RetainPtr<CFX_DIBitmap> m_Mask;
38};
39
40#endif // CORE_FXGE_CFX_CLIPRGN_H_
CFX_ClipRgn(int device_width, int device_height)
void IntersectRect(const FX_RECT &rect)
RetainPtr< CFX_DIBitmap > GetMask() const
Definition cfx_cliprgn.h:25
ClipType GetType() const
Definition cfx_cliprgn.h:23
const FX_RECT & GetBox() const
Definition cfx_cliprgn.h:24
CFX_ClipRgn(const CFX_ClipRgn &src)
void IntersectMaskF(int left, int top, RetainPtr< CFX_DIBitmap > Mask)
constexpr CFX_FloatRect(float l, float b, float r, float t)
void Intersect(const CFX_FloatRect &other_rect)
FX_RECT GetOuterRect() const
bool Continue(PauseIndicatorIface *pPause)
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
CFX_Matrix operator*(const CFX_Matrix &right) const
CFX_PointF Transform(const CFX_PointF &point) const
float GetXUnit() const
CFX_Matrix GetInverse() const
float GetYUnit() const
void SetBitmap(RetainPtr< CFX_DIBitmap > bitmap)
bool FillRectWithBlend(const FX_RECT &rect, uint32_t fill_color, BlendMode blend_type) override
CFX_AggDeviceDriver(RetainPtr< CFX_DIBitmap > pBitmap, bool bRgbByteOrder, RetainPtr< CFX_DIBitmap > pBackdropBitmap, bool bGroupKnockout)
bool ContinueDIBits(CFX_ImageRenderer *handle, PauseIndicatorIface *pPause) override
bool DrawDeviceText(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color, const CFX_TextRenderOptions &options) override
void RestoreState(bool bKeepSaved) override
bool StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t argb, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, std::unique_ptr< CFX_ImageRenderer > *handle, BlendMode blend_type) override
bool GetClipBox(FX_RECT *pRect) override
int GetDeviceCaps(int caps_id) const override
bool GetDIBits(const RetainPtr< CFX_DIBitmap > &pBitmap, int left, int top) override
RetainPtr< CFX_DIBitmap > GetBackDrop() override
bool SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) override
int GetDriverType() const override
bool MultiplyAlpha(float alpha) override
DeviceType GetDeviceType() const override
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, BlendMode blend_type) override
bool MultiplyAlphaMask(const RetainPtr< const CFX_DIBBase > &mask) override
bool SetDIBits(const RetainPtr< const CFX_DIBBase > &pBitmap, uint32_t argb, const FX_RECT &src_rect, int left, int top, BlendMode blend_type) override
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t argb, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT *pClipRect, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
bool SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
BlendMode
Definition fx_dib.h:49
#define FXRGB2GRAY(r, g, b)
Definition fx_dib.h:131
#define FXARGB_B(argb)
Definition fx_dib.h:127
#define FXARGB_G(argb)
Definition fx_dib.h:126
#define FXARGB_SETRGBORDERDIB(p, argb)
Definition fx_dib.h:142
#define FXARGB_A(argb)
Definition fx_dib.h:124
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118
#define FXARGB_TOBGRORDERDIB(argb)
Definition fx_dib.h:150
#define FXARGB_SETDIB(p, argb)
Definition fx_dib.h:137
#define FXARGB_R(argb)
Definition fx_dib.h:125
FXDIB_Format
Definition fx_dib.h:19
#define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha)
Definition fx_dib.h:132
#define CHECK(cvref)
#define FXDC_BITS_PIXEL
#define FXDC_RENDER_CAPS
#define FXDC_PIXEL_WIDTH
#define FXRC_ALPHA_OUTPUT
#define FXDC_VERT_SIZE
#define FXDC_PIXEL_HEIGHT
#define FXDC_HORZ_SIZE
#define FXRC_ALPHA_PATH
#define FXRC_BLEND_MODE
#define FXRC_ALPHA_IMAGE
#define FXRC_GET_BITS
#define FXRC_BYTEMASK_OUTPUT
#define FXRC_SOFT_CLIP
void Offset(int dx, int dy)
int Height() const
int32_t bottom
int32_t right
int Width() const
void Normalize()
int32_t top
int32_t left
void Intersect(const FX_RECT &src)
bool IsEmpty() const
constexpr FX_RECT(int l, int t, int r, int b)
#define UNOWNED_PTR_EXCLUSION