canvas: extend PolyItem API with ::add_point()
This commit is contained in:
@@ -36,6 +36,7 @@ public:
|
||||
virtual void compute_bounding_box () const;
|
||||
|
||||
virtual void set (Points const&);
|
||||
virtual void add_point (Duple const &);
|
||||
Points const& get () const;
|
||||
|
||||
void dump (std::ostream&) const;
|
||||
|
||||
@@ -140,6 +140,15 @@ PolyItem::set (Points const& points)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PolyItem::add_point (Duple const & d)
|
||||
{
|
||||
begin_change ();
|
||||
_points.push_back (d);
|
||||
set_bbox_dirty ();
|
||||
end_change ();
|
||||
}
|
||||
|
||||
Points const&
|
||||
PolyItem::get () const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user