public Helper(
final Item item,
final PreviewProperties properties) {
sourceItem = item.getData(SOURCE);
targetItem = item.getData(TARGET);
x1 = sourceItem.getData(NodeItem.X);
x2 = targetItem.getData(NodeItem.X);
y1 = sourceItem.getData(NodeItem.Y);
y2 = targetItem.getData(NodeItem.Y);
final Vector direction = new Vector(x2, y2);
direction.sub(new Vector(x1, y1));
final float length = direction.mag();
direction.normalize();
final float factor
= properties.getFloatValue(BEZIER_CURVENESS) * length;
final Vector n = new Vector(direction.y, -direction.x);
n.mult(factor);
v1 = computeCtrlPoint(x1, y1, direction, factor, n);
v2 = computeCtrlPoint(x2, y2, direction, -factor, n);
}