Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions core/src/main/java/com/threerings/getdown/util/Rectangle.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//
// Getdown - application installer, patcher and launcher
// Copyright (C) 2004-2018 Getdown authors
// https://github.com/threerings/getdown/blob/master/LICENSE

package com.threerings.getdown.util;

/**
Expand All @@ -15,8 +10,18 @@ public class Rectangle
public final int width;
public final int height;

public Rectangle (int x, int y, int width, int height)
{
// New: zero-argument constructor
public Rectangle() {
this(0, 0, 0, 0);
}

// New: width & height only constructor
public Rectangle(int width, int height) {
this(0, 0, width, height);
}

// Existing: full constructor
public Rectangle(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
Expand Down