\r
}\r
\r
+ public Ellipse (Ellipse ellipse) {\r
+ this.x = ellipse.x;\r
+ this.y = ellipse.y;\r
+ this.width = ellipse.width;\r
+ this.height = ellipse.height;\r
+ }\r
+\r
public Ellipse (float x, float y, float width, float height) {\r
this.x = x;\r
this.y = y;\r
this.height = height;\r
}\r
\r
- public void set (Ellipse ellipse) { \r
+ public void set (Ellipse ellipse) {\r
x = ellipse.x;\r
y = ellipse.y;\r
width = ellipse.width;\r
height = ellipse.height;\r
}\r
- \r
+\r
+ /** Sets the x and y-coordinates of ellipse center from vector\r
+ * @param position The position vector \r
+ * @return this ellipse for chaining */\r
+ public Ellipse setPosition (Vector2 position) {\r
+ this.x = position.x;\r
+ this.y = position.y;\r
+\r
+ return this;\r
+ }\r
+\r
+ /** Sets the x and y-coordinates of ellipse center\r
+ * @param x The x-coordinate\r
+ * @param y The y-coordinate \r
+ * @return this ellipse for chaining */\r
+ public Ellipse setPosition (float x, float y) {\r
+ this.x = x;\r
+ this.y = y;\r
+\r
+ return this;\r
+ }\r
+\r
+ /** Sets the width and height of this ellipse\r
+ * @param width The width\r
+ * @param height The height \r
+ * @return this ellipse for chaining */\r
+ public Ellipse setSize (float width, float height) {\r
+ this.width = width;\r
+ this.height = height;\r
+\r
+ return this;\r
+ }\r
}\r