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
cxfa_ffarc.cpp
Go to the documentation of this file.
1// Copyright 2017 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/fxfa/cxfa_ffarc.h"
8
9#include "xfa/fxfa/parser/cxfa_arc.h"
10#include "xfa/fxfa/parser/cxfa_value.h"
11
12CXFA_FFArc::CXFA_FFArc(CXFA_Node* pNode) : CXFA_FFWidget(pNode) {}
13
14CXFA_FFArc::~CXFA_FFArc() = default;
15
16void CXFA_FFArc::RenderWidget(CFGAS_GEGraphics* pGS,
17 const CFX_Matrix& matrix,
18 HighlightOption highlight) {
19 if (!HasVisibleStatus())
20 return;
21
22 CXFA_Value* value = m_pNode->GetFormValueIfExists();
23 if (!value)
24 return;
25
27 CXFA_Margin* margin = m_pNode->GetMarginIfExists();
28 XFA_RectWithoutMargin(&rtArc, margin);
29
30 CFX_Matrix mtRotate = GetRotateMatrix();
31 mtRotate.Concat(matrix);
32 DrawBorder(pGS, value->GetArcIfExists(), rtArc, mtRotate);
33}
void Concat(const CFX_Matrix &right)
~CXFA_FFArc() override
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
CFX_Matrix GetRotateMatrix() override
CXFA_FFWidget(CXFA_Node *pNode)
bool HasVisibleStatus() const
void DrawBorder(CFGAS_GEGraphics *pGS, CXFA_Box *box, const CFX_RectF &rtBorder, const CFX_Matrix &matrix)
CFX_RectF GetRectWithoutRotate()
CXFA_Arc * GetArcIfExists() const
void XFA_RectWithoutMargin(CFX_RectF *rt, const CXFA_Margin *margin)