package BlitzEdit.core;

public abstract class RotatableElement extends Element
{
	void setRotation(short rotation)
	{
		if (rotation > 180 || rotation < -180)
			return;
		_rotation = rotation;
	}
	
	public RotatableElement(int x, int y, int sizeX, int sizeY, short rot)
	{
		super(x, y, sizeX, sizeY);
		_rotation = rot;
	}
	
	public RotatableElement(int x, int y, short rot)
	{
		super(x, y);
		_rotation = rot;
	}
	
	public RotatableElement()
	{
		super();
		_rotation = 0;
	}
	

	public short _rotation;
}
@@ -18,16 +18,44 @@
 .core;%0A%0A
+import java.awt.Rectangle;%0A%0A
 public a
@@ -104,16 +104,79 @@
 ment%0A%7B%0A%09
+public short getRotation()%0A%09%7B%0A%09%09return _rotation;%0A%09%7D%0A%09%0A%09public 
 void set
@@ -276,32 +276,237 @@
  rotation;%0A%09%7D%0A%09%0A
+%09public boolean contains(int x, int y)%0A%09%7B%0A%09%09Rectangle rect = new Rectangle(_posX, _posY, _sizeX, _sizeY);%0A%09%09//TODO: check containment of (x, y) with considering rotation%0A%09%09return rect.contains(x, y);%0A%09%7D%0A%09%0A
 %09public Rotatabl
@@ -775,21 +775,22 @@
 %09%7D%0A%09%0A%0A%09p
-ublic
+rivate
  short _
@@ -800,8 +800,9 @@
 ation;%0A%7D
+%0A

Update RotatableElement.java