#ifndef PDF_PDF_INK_BRUSH_H_
#define PDF_PDF_INK_BRUSH_H_
#include <optional>
#include <string>
#include "third_party/ink/src/ink/brush/brush.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
namespace gfx {
class PointF;
}
namespace chrome_pdf {
class PdfInkBrush {
public:
enum class Type {
kHighlighter,
kPen,
};
PdfInkBrush(Type brush_type, SkColor color, float size);
PdfInkBrush(const PdfInkBrush&) = delete;
PdfInkBrush& operator=(const PdfInkBrush&) = delete;
~PdfInkBrush();
gfx::Rect GetInvalidateArea(const gfx::PointF& center1,
const gfx::PointF& center2) const;
static std::optional<Type> StringToType(const std::string& brush_type);
static std::string TypeToString(Type brush_type);
static bool IsToolSizeInRange(float size);
const ink::Brush& ink_brush() const { return ink_brush_; }
void SetColor(SkColor color);
void SetSize(float size);
private:
ink::Brush ink_brush_;
};
}
#endif