if( ( direction1 > 0 && direction2 > 0 ) || ( direction1 < 0 && direction2 < 0 ) )
{
if( Settings.CURVED_EDGES )
{
QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos2.getX(), (int)tempPos2.getY(), pivotX, pivotY, (int)tempPos.getX(),
(int)tempPos.getY() );
g2d.draw( quadCurve );
}
else
{
g2d.drawLine( x2, y2, x1, y1 );
}
}
else
{
if( Settings.CURVED_EDGES )
{
QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos2.getX(), (int)tempPos2.getY(), pivotX, pivotY, (int)tempPos.getX(),
(int)tempPos.getY() );
g2d.draw( quadCurve );
}
else
{
g2d.drawLine( x2, y2, x1, y1 );
}
}
if( tempEdge.isDirectional() )
{
int x[] = { x1, (int)Math.round( x1 + arrowHeadLength * Math.cos( angle1 ) ),
(int)Math.round( x1 + arrowHeadLength * Math.cos( angle2 ) ) };
int y[] = { y1, (int)Math.round( y1 + arrowHeadLength * Math.sin( angle1 ) ),
(int)Math.round( y1 + arrowHeadLength * Math.sin( angle2 ) ) };
g2d.fillPolygon( x, y, 3 );
}
}
else
{
if( Settings.CURVED_EDGES )
{
QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos.getX(), (int)tempPos.getY(), pivotX, pivotY, (int)tempPos2.getX(),
(int)tempPos2.getY() );
g2d.draw( quadCurve );
}
else
{