Skip to content

Commit c1c497d

Browse files
committed
added move operation for Striped_closed_polyline in exercise07 chapter12
1 parent a417bbc commit c1c497d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Chapter12/exercises/07/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class Striped_closed_polyline : public Closed_polyline {
3939
Closed_polyline::draw_specifics(painter);
4040
stripes->draw_specifics(painter);
4141
}
42+
void move(int dx, int dy) override {
43+
Closed_polyline::move(dx, dy);
44+
stripes->move(dx, dy);
45+
}
4246
int spacing() const { return sp; }
4347
void set_spacing(int i) { sp = i; update_stripes(); }
4448
private:

0 commit comments

Comments
 (0)