14 bool operator<(
const PatchKey &other)
const
16 if (type < other.type)
18 else if (type > other.type)
21 if (layer < other.layer)
23 else if (layer > other.layer)
26 return net < other.net;
30 const std::map<PatchKey, ClipperLib::Paths> &get_patches()
const;
31 const std::set<std::tuple<int, Coordi, Coordi>> &get_text_extents()
const;
32 void clear()
override;
34 void append_polygon(
const Polygon &poly);
36 enum class SimplifyOnUpdate { YES, NO };
37 CanvasPatch(SimplifyOnUpdate simplify_on_update = SimplifyOnUpdate::YES);
42 void request_push()
override;
46 const SimplifyOnUpdate simplify_on_update;
47 const Net *net =
nullptr;
48 PatchType patch_type = PatchType::OTHER;
49 virtual void img_net(
const Net *net)
override;
50 virtual void img_polygon(
const Polygon &poly,
bool tr)
override;
51 virtual void img_polygon(
const Polygon &poly,
bool tr,
const LayerRange &layer);
52 virtual void img_hole(
const class Hole &hole)
override;
53 virtual void img_patch_type(PatchType type)
override;
55 std::map<PatchKey, ClipperLib::Paths> patches;
56 std::set<std::tuple<int, Coordi, Coordi>> text_extents;