default constructor initializes position/size to 0 so people don't have to call Empty() any more.

This commit is contained in:
pinkerton%netscape.com 1998-10-29 18:06:45 +00:00
parent 690dc03bc0
commit 82e3dddcc8

View File

@ -32,7 +32,7 @@ struct NS_GFX nsRect {
nscoord width, height;
// Constructors
nsRect() {}
nsRect() : x(0), y(0), width(0), height(0) {}
nsRect(const nsRect& aRect) {*this = aRect;}
nsRect(const nsPoint& aOrigin, const nsSize &aSize) {x = aOrigin.x; y = aOrigin.y;
width = aSize.width; height = aSize.height;}