org.af.commons.images
Class GraphDrawHelper

java.lang.Object
  extended by org.af.commons.images.GraphDrawHelper

public class GraphDrawHelper
extends Object

Die G9-Gui-Klasse stellt statische Methoden bereit, die auf java.awt.Graphics-Objekten arbeiten.

Version:
26 Dec 2001
Author:
G9-Gui
See Also:
Graphics

Field Summary
static int corr
           
 
Constructor Summary
GraphDrawHelper()
           
 
Method Summary
static void drawSpline(Graphics g, int x1, int y1, int x2, int y2)
           
static int[] getDrawPoints(long x1, long y1, long x2, long y2)
          Returns the point in the middle of the curve from (x1,x2) to (x2,y2).
static void malPfeil(Graphics g, int x1, int y1, int x2, int y2, int l)
          Zeichnet einen Pfeil mit rechtwinkliger Spitze
static void malPfeil(Graphics g, int x1, int y1, int x2, int y2, int l, int grad)
          Zeichnet einen Pfeil
static void malVollenPfeil(Graphics g, int x1, int y1, int x2, int y2, int l, boolean curve)
          Zeichnet einen Pfeil mit ausgefüllter rechtwinkliger Spitze
static void malVollenPfeil(Graphics g, int x1, int y1, int x2, int y2, int l, int grad)
          Zeichnet einen Pfeil mit ausgefüllter Spitze
static int sign(int zahl)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

corr

public static int corr
Constructor Detail

GraphDrawHelper

public GraphDrawHelper()
Method Detail

malPfeil

public static void malPfeil(Graphics g,
                            int x1,
                            int y1,
                            int x2,
                            int y2,
                            int l)
Zeichnet einen Pfeil mit rechtwinkliger Spitze

Parameters:
g - das zu bearbeitende Graphics-Objekt
x1 - die Abszisse des Pfeilanfangs
y1 - die Ordinate des Pfeilanfangs
x2 - die Abszisse des Pfeilendes
y2 - die Ordinate des Pfeilendes
l - die Länge der Pfeilspitze

malVollenPfeil

public static void malVollenPfeil(Graphics g,
                                  int x1,
                                  int y1,
                                  int x2,
                                  int y2,
                                  int l,
                                  boolean curve)
Zeichnet einen Pfeil mit ausgefüllter rechtwinkliger Spitze

Parameters:
g - das zu bearbeitende Graphics-Objekt
x1 - die Abszisse des Pfeilanfangs
y1 - die Ordinate des Pfeilanfangs
x2 - die Abszisse des Pfeilendes
y2 - die Ordinate des Pfeilendes
l - die Länge der Pfeilspitze

sign

public static int sign(int zahl)

malPfeil

public static void malPfeil(Graphics g,
                            int x1,
                            int y1,
                            int x2,
                            int y2,
                            int l,
                            int grad)
Zeichnet einen Pfeil

Parameters:
g - das zu bearbeitende Graphics-Objekt
x1 - die Abszisse des Pfeilanfangs
y1 - die Ordinate des Pfeilanfangs
x2 - die Abszisse des Pfeilendes
y2 - die Ordinate des Pfeilendes
l - die Länge der Pfeilspitze
grad - der Winkel zwischen Pfeilspitzenschenkeln und Pfeilrumpf

malVollenPfeil

public static void malVollenPfeil(Graphics g,
                                  int x1,
                                  int y1,
                                  int x2,
                                  int y2,
                                  int l,
                                  int grad)
Zeichnet einen Pfeil mit ausgefüllter Spitze

Parameters:
g - das zu bearbeitende Graphics-Objekt
x1 - die Abszisse des Pfeilanfangs
y1 - die Ordinate des Pfeilanfangs
x2 - die Abszisse des Pfeilendes
y2 - die Ordinate des Pfeilendes
l - die Länge der Pfeilspitze
grad - der Winkel zwischen Pfeilspitzenschenkeln und Pfeilrumpf

drawSpline

public static void drawSpline(Graphics g,
                              int x1,
                              int y1,
                              int x2,
                              int y2)

getDrawPoints

public static int[] getDrawPoints(long x1,
                                  long y1,
                                  long x2,
                                  long y2)
Returns the point in the middle of the curve from (x1,x2) to (x2,y2).

Parameters:
x1 - die Abszisse des Pfeilanfangs
y1 - die Ordinate des Pfeilanfangs
x2 - die Abszisse des Pfeilendes
y2 - die Ordinate des Pfeilendes
Returns:
point in the middle of the curve from (x1,x2) to (x2,y2)