package cnp.ew.diagram;

import java.awt.*;

import cnp.ew.lightweight.*;

public class CpOffsetLocator implements CpLocator
{
    CpLocator mainLocator;
    Point offset;

    public CpOffsetLocator(CpLocator mainLocator, Point offset)
    {
        this.mainLocator = mainLocator;
        this.offset = offset;
    }

    public Point getPoint(CpDiagrammableLc lc)
    {
        Point p = mainLocator.getPoint(lc);
        return new Point(p.x + offset.x, p.y + offset.y);
    }

}