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
16CFWL_CaretTP::CFWL_CaretTP() = default;
17
18CFWL_CaretTP::~CFWL_CaretTP() = default;
19
20void CFWL_CaretTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
21 switch (pParams.GetPart()) {
23 if (!(pParams.m_dwStates & CFWL_PartState::kHightLight))
24 return;
25
26 DrawCaretBK(pParams.GetGraphics(), pParams.m_dwStates, pParams.m_PartRect,
27 pParams.m_matrix);
28 break;
29 }
30 default:
31 break;
32 }
33}
34
35void CFWL_CaretTP::DrawCaretBK(CFGAS_GEGraphics* pGraphics,
36 Mask<CFWL_PartState> dwStates,
37 const CFX_RectF& rect,
38 const CFX_Matrix& matrix) {
39 CFGAS_GEPath path;
40 path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
43}
CFWL_PartState
CFGAS_GEColor(const 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
CFX_RectF m_PartRect
CFX_Matrix m_matrix
Part GetPart() const
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118