#include "pdf/pdf_ink_brush.h"
#include <numbers>
#include <optional>
#include <utility>
#include "base/check_op.h"
#include "base/notreached.h"
#include "pdf/ink/ink_brush.h"
#include "pdf/ink/ink_brush_family.h"
#include "pdf/ink/ink_brush_paint.h"
#include "pdf/ink/ink_brush_tip.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace chrome_pdf {
namespace {
std::string CreateBrushUri() { … }
float GetCornerRounding(PdfInkBrush::Type type) { … }
float GetOpacity(PdfInkBrush::Type type) { … }
std::unique_ptr<InkBrush> CreateInkBrush(PdfInkBrush::Type type,
PdfInkBrush::Params params) { … }
gfx::Rect GetPointInvalidateArea(float brush_diameter,
const gfx::PointF& center) { … }
}
std::optional<PdfInkBrush::Type> PdfInkBrush::StringToType(
const std::string& brush_type) { … }
void PdfInkBrush::CheckToolSizeIsInRange(float size) { … }
PdfInkBrush::PdfInkBrush(Type brush_type, Params brush_params)
: … { … }
PdfInkBrush::~PdfInkBrush() = default;
const InkBrush& PdfInkBrush::GetInkBrush() const { … }
gfx::Rect PdfInkBrush::GetInvalidateArea(const gfx::PointF& center1,
const gfx::PointF& center2) const { … }
}