TUM CCSM Commons

edu.tum.cs.commons.image
Class GraphicsUtils

java.lang.Object
  extended by edu.tum.cs.commons.image.GraphicsUtils

public class GraphicsUtils
extends java.lang.Object

Utility classes for graphics.

Version:
$Rev: 26268 $
Author:
hummelb, $Author: juergens $
Rating:
GREEN Hash: 1143143992222183FB5A5906384AA829

Constructor Summary
GraphicsUtils()
           
 
Method Summary
static java.awt.geom.GeneralPath getArrowHead(java.awt.Point p1, java.awt.Point p2, int arrowBarbSize, double arrowPhi)
          Returns a path for the arrow at the end of an edge from p1 to p2.
static java.awt.Point getChopboxAnchor(java.awt.Rectangle box, java.awt.Point referencePoint)
          The ChopboxAnchor's location is found by calculating the intersection of a line drawn from the center point of a box to a reference point and that box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsUtils

public GraphicsUtils()
Method Detail

getArrowHead

public static java.awt.geom.GeneralPath getArrowHead(java.awt.Point p1,
                                                     java.awt.Point p2,
                                                     int arrowBarbSize,
                                                     double arrowPhi)
Returns a path for the arrow at the end of an edge from p1 to p2.

Parameters:
arrowBarbSize - gives the size of the barb in pixels (i.e. the size of the arrow tip)
arrowPhi - gives the angle between the barbs and the center line, i.e. this is half of the angle of the arrow tip.

getChopboxAnchor

public static java.awt.Point getChopboxAnchor(java.awt.Rectangle box,
                                              java.awt.Point referencePoint)
The ChopboxAnchor's location is found by calculating the intersection of a line drawn from the center point of a box to a reference point and that box. Code borrowed from org.eclipse.draw2d.ChopboxAnchor.


TUM CCSM Commons

TUM CCSM Commons - 2.7