7#include "xfa/fxfa/parser/cxfa_stipple.h"
9#include "fxjs/xfa/cjx_node.h"
10#include "xfa/fgas/graphics/cfgas_gegraphics.h"
11#include "xfa/fxfa/parser/cxfa_color.h"
12#include "xfa/fxfa/parser/cxfa_document.h"
30CXFA_Stipple::CXFA_Stipple(CXFA_Document* doc,
XFA_PacketType packet)
33 {XFA_XDPPACKET::kTemplate, XFA_XDPPACKET::kForm},
37 kStippleAttributeData,
38 cppgc::MakeGarbageCollected<CJX_Node>(
39 doc->GetHeap()->GetAllocationHandle(),
44CXFA_Color* CXFA_Stipple::GetColorIfExists() {
45 return GetChild<CXFA_Color>(0,
XFA_Element::Color,
false);
48int32_t CXFA_Stipple::GetRate() {
55 const CFGAS_GEPath& fillPath,
58 int32_t iRate = GetRate();
62 CXFA_Color* pColor = GetColorIfExists();
67 std::tie(alpha, colorref) = ArgbToAlphaAndColorRef(crColor);
CFGAS_GEColor(const FX_ARGB argb)
StateRestorer(CFGAS_GEGraphics *graphics)
void FillPath(const CFGAS_GEPath &path, CFX_FillRenderOptions::FillType fill_type, const CFX_Matrix &matrix)
void SetFillColor(const CFGAS_GEColor &color)
static constexpr FX_ARGB kBlackColor
void Draw(CFGAS_GEGraphics *pGS, const CFGAS_GEPath &fillPath, const CFX_RectF &rtFill, const CFX_Matrix &matrix)
static int32_t GetDefaultRate()
FX_ARGB AlphaAndColorRefToArgb(int a, FX_COLORREF colorref)