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
|
package com.drew.metadata.photoshop;
/**
* Represents a knot created by Photoshop:
*
* <ul>
* <li>Linked knot</li>
* <li>Unlinked knot</li>
* </ul>
*
* @author Payton Garland
*/
public class Knot
{
private final double[] _points = new double[6];
private final String _type;
public Knot(String type)
{
_type = type;
}
/**
* Add an individual coordinate value (x or y) to
* points array (6 points per knot)
*
* @param index location of point to be added in points
* @param point coordinate value to be added to points
*/
public void setPoint(int index, double point)
{
_points[index] = point;
}
/**
* Get an individual coordinate value (x or y)
*
* @return an individual coordinate value
*/
public double getPoint(int index)
{
return _points[index];
}
/**
* Get the type of knot (linked or unlinked)
*
* @return the type of knot
*/
public String getType()
{
return this._type;
}
}
|