Check-in [3a3220db83]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add missing files
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:3a3220db834f1b2eafe8793f68a449685fa752f3
User & Date: devnewton 2012-04-01 10:44:00
Context
2012-04-01
10:44
add missing files Leaf check-in: 3a3220db83 user: devnewton tags: trunk
2012-01-21
17:40
initial import check-in: 6483bb6ca5 user: devnewton tags: trunk
Changes

Added src/tiled/core/Rectangle.java.





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package tiled.core;

import tiled.util.Dimension;

public class Rectangle {

	public int x;
	public int y;
	public int width;
	public int height;

	public Rectangle(int width, int height) {
		this.width = width;
		this.height = height;
	}

	public Rectangle() {
		// TODO Auto-generated constructor stub
	}

	public Rectangle(Rectangle r) {
		setBounds(r);
	}

	public Rectangle(int x2, int y2, int width2, int height2) {
		x = x2;
		y = y2;
		width = width2;
		height = height2;
	}

	public Rectangle(Dimension tileDimensions) {
		this.width = tileDimensions.width;
		this.height = tileDimensions.height;
	}

	public void setBounds(Rectangle r) {
		x = r.x;
		y = r.y;
		width = r.width;
		height = r.height;
	}

	public boolean contains(int x2, int y2) {
        if ((width | height) < 0) {
            return false;
        }
        if (x2 < x || y2 < y) {
            return false;
        }
        int w = x + width;
        int h = y + height;
        return ((w < x || w > x2) && (h < y || h > y2));
	}

	public void translate(int dx, int dy) {
		x += dx;
		y += dy;
		
	}

}

Added src/tiled/util/Dimension.java.

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
package tiled.util;

public class Dimension {

	public Dimension(int tileWidth, int tileHeight) {
		this.width = tileWidth;
		this.height = tileHeight;
	}
	public int width;
	public int height;

}