package CH.ifa.draw.figures;

import java.awt.Point;

import de.renew.draw.storables.ontology.Figure;

/**
 * Defines methods for manipulating the Points (nodes) of figures,
 * including inserting, removing, setting, and retrieving Points.
 * @deprecated This interface is not to be used externally and will later be hidden.
 */
@Deprecated(since = "5.0", forRemoval = true)
public interface PolyLineable extends Figure {

    /**
     * Line shape.
     * @deprecated This field is currently not used and will be removed in a later version.
     */
    @Deprecated(since = "5.0", forRemoval = true)
    int LINE_SHAPE = 0;

    /**
     * B-spline shape.
     * @deprecated This field is currently not used and will be removed in a later version.
     */
    @Deprecated(since = "5.0", forRemoval = true)
    int BSPLINE_SHAPE = 1;

    /**
     * Inserts a Point/node at the given index.
     *
     * @param p Point to be inserted
     * @param i index
     */
    void insertPointAt(Point p, int i);

    /**
     * Removes the Point at the given index.
     *
     * @param i index
     */
    void removePointAt(int i);

    /**
     * Sets the given index to the given Point.
     *
     * @param p Point
     * @param i index
     */
    void setPointAt(Point p, int i);

    /**
     * Returns the number of Points in the Figure.
     *
     * @return number of Points
     */
    int pointCount();

    /**
     * Returns the Point found at the given index.
     *
     * @param i index
     * @return Point found at index
     */
    Point pointAt(int i);
}