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
cfwl_carettp.cpp
Go to the documentation of this file.
1// Copyright 2014 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#include "xfa/fwl/theme/cfwl_carettp.h"
8
9#include "xfa/fgas/graphics/cfgas_gecolor.h"
10#include "xfa/fgas/graphics/cfgas_gegraphics.h"
11#include "xfa/fgas/graphics/cfgas_gepath.h"
12#include "xfa/fwl/cfwl_caret.h"
13#include "xfa/fwl/cfwl_themebackground.h"
14#include "xfa/fwl/cfwl_widget.h"
15
16namespace pdfium {
17
18CFWL_CaretTP::CFWL_CaretTP() = default;
19
20CFWL_CaretTP::~CFWL_CaretTP() = default;
21
22void CFWL_CaretTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
23 switch (pParams.GetPart()) {
25 if (!(pParams.m_dwStates & CFWL_PartState::kHightLight))
26 return;
27
28 DrawCaretBK(pParams.GetGraphics(), pParams.m_dwStates, pParams.m_PartRect,
29 pParams.m_matrix);
30 break;
31 }
32 default:
33 break;
34 }
35}
36
37void CFWL_CaretTP::DrawCaretBK(CFGAS_GEGraphics* pGraphics,
38 Mask<CFWL_PartState> dwStates,
39 const CFX_RectF& rect,
40 const CFX_Matrix& matrix) {
41 CFGAS_GEPath path;
42 path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
45}
46
47} // namespace pdfium
CFGAS_GEColor(FX_ARGB argb)
void FillPath(const CFGAS_GEPath &path, CFX_FillRenderOptions::FillType fill_type, const CFX_Matrix &matrix)
void SetFillColor(const CFGAS_GEColor &color)
void AddRectangle(float left, float top, float width, float height)
void DrawBackground(const CFWL_ThemeBackground &pParams) override
~CFWL_CaretTP() override
CFGAS_GEGraphics * GetGraphics() const
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:188