#include "xfa/fxfa/parser/cxfa_box.h"
#include <math.h>
#include <algorithm>
#include <utility>
#include "core/fxcrt/notreached.h"
#include "core/fxcrt/numerics/safe_conversions.h"
#include "fxjs/xfa/cjx_object.h"
#include "xfa/fgas/graphics/cfgas_gegraphics.h"
#include "xfa/fgas/graphics/cfgas_gepath.h"
#include "xfa/fgas/graphics/cfgas_gepattern.h"
#include "xfa/fgas/graphics/cfgas_geshading.h"
#include "xfa/fxfa/parser/cxfa_corner.h"
#include "xfa/fxfa/parser/cxfa_edge.h"
#include "xfa/fxfa/parser/cxfa_fill.h"
#include "xfa/fxfa/parser/cxfa_margin.h"
#include "xfa/fxfa/parser/cxfa_measurement.h"
#include "xfa/fxfa/parser/cxfa_node.h"
#include "xfa/fxfa/parser/cxfa_rectangle.h"
namespace {
std::pair<XFA_AttributeValue, CXFA_Stroke*> Style3D(
const std::vector<CXFA_Stroke*>& strokes) { … }
CXFA_Rectangle* ToRectangle(CXFA_Box* box) { … }
}
CXFA_Box::CXFA_Box(CXFA_Document* pDoc,
XFA_PacketType ePacket,
Mask<XFA_XDPPACKET> validPackets,
XFA_ObjectType oType,
XFA_Element eType,
pdfium::span<const PropertyData> properties,
pdfium::span<const AttributeData> attributes,
CJX_Object* js_node)
: … { … }
CXFA_Box::~CXFA_Box() = default;
XFA_AttributeValue CXFA_Box::GetHand() { … }
XFA_AttributeValue CXFA_Box::GetPresence() { … }
size_t CXFA_Box::CountEdges() { … }
CXFA_Edge* CXFA_Box::GetEdgeIfExists(size_t nIndex) { … }
std::vector<CXFA_Stroke*> CXFA_Box::GetStrokes() { … }
bool CXFA_Box::IsCircular() { … }
std::optional<int32_t> CXFA_Box::GetStartAngle() { … }
std::optional<int32_t> CXFA_Box::GetSweepAngle() { … }
CXFA_Fill* CXFA_Box::GetOrCreateFillIfPossible() { … }
std::tuple<XFA_AttributeValue, bool, float> CXFA_Box::Get3DStyle() { … }
std::vector<CXFA_Stroke*> CXFA_Box::GetStrokesInternal(bool bNull) { … }
void CXFA_Box::Draw(CFGAS_GEGraphics* pGS,
const CFX_RectF& rtWidget,
const CFX_Matrix& matrix,
bool forceRound) { … }
void CXFA_Box::DrawFill(const std::vector<CXFA_Stroke*>& strokes,
CFGAS_GEGraphics* pGS,
CFX_RectF rtWidget,
const CFX_Matrix& matrix,
bool forceRound) { … }
void CXFA_Box::GetPathArcOrRounded(CFX_RectF rtDraw,
bool forceRound,
CFGAS_GEPath* fillPath) { … }
void CXFA_Box::StrokeArcOrRounded(CFGAS_GEGraphics* pGS,
CFX_RectF rtWidget,
const CFX_Matrix& matrix,
bool forceRound) { … }