Lines 52-58
Link Here
|
52 |
|
52 |
|
53 |
/** |
53 |
/** |
54 |
* Returns the point of reference associated with this locator. This point |
54 |
* Returns the point of reference associated with this locator. This point |
55 |
* will be midway between points at 'index' and 'index' + 1. |
55 |
* will be midway between the point at position 'index' and the point at the |
|
|
56 |
* last position. |
56 |
* |
57 |
* |
57 |
* @return the reference point |
58 |
* @return the reference point |
58 |
* @since 2.0 |
59 |
* @since 2.0 |
Lines 61-67
Link Here
|
61 |
Connection conn = getConnection(); |
62 |
Connection conn = getConnection(); |
62 |
Point p = Point.SINGLETON; |
63 |
Point p = Point.SINGLETON; |
63 |
Point p1 = conn.getPoints().getPoint(getIndex()); |
64 |
Point p1 = conn.getPoints().getPoint(getIndex()); |
64 |
Point p2 = conn.getPoints().getPoint(getIndex() + 1); |
65 |
Point p2 = conn.getPoints().getPoint(conn.getPoints().size() - 1); |
65 |
conn.translateToAbsolute(p1); |
66 |
conn.translateToAbsolute(p1); |
66 |
conn.translateToAbsolute(p2); |
67 |
conn.translateToAbsolute(p2); |
67 |
p.x = (p2.x - p1.x) / 2 + p1.x; |
68 |
p.x = (p2.x - p1.x) / 2 + p1.x; |