13
0

Canvas: add aliases to Canvas::Rect for comprehension

This commit is contained in:
Paul Davis 2020-06-10 19:36:29 -06:00
parent 2423994029
commit e0c58a2736

View File

@ -81,6 +81,11 @@ struct LIBCANVAS_API Duple
Coord x;
Coord y;
/* alias */
Coord width() const { return x; }
Coord height() const { return y; }
Duple translate (const Duple& t) const throw() {
return Duple (canvas_safe_add (x, t.x), canvas_safe_add (y, t.y));
}