public class VisualisationUtils
extends java.lang.Object
Constructor and Description |
---|
VisualisationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
drawBorder(java.awt.image.BufferedImage buffImage)
draws a black border around the image
|
static void |
drawMarker(java.awt.Graphics2D g,
int markerWidth,
int markerHeight,
java.awt.Point location)
Draws a circle-marker on the given position
|
static void |
drawThickLine(java.awt.Graphics2D g,
int x1,
int y1,
int x2,
int y2,
int lineWidth,
int lineHeight)
Draws a thick line of the given width and height, between the given coordinates
|
static void |
drawThickLine(java.awt.Graphics2D g,
java.awt.Point p1,
java.awt.Point p2,
int unitWidth,
int unitHeight)
Draws a think line between the two given points.
|
static void |
drawThickLine(java.awt.Graphics2D g,
Unit u1,
Unit u2,
int unitWidth,
int unitHeight)
Draws a thick line from the centre of u1 to u2, using
drawThickLine(Graphics2D, Point, Point, int, int) |
static void |
drawUnitCentreMarker(java.awt.Graphics2D g,
Unit unit,
int unitWidth,
int unitHeight,
int markerWidth,
int markerHeight)
Draws a marker in the centre of the given unit.
|
static void |
drawUnitGrid(java.awt.image.BufferedImage bufferedImage,
GrowingSOM gsom,
int width,
int height)
Draws a black grid of units on the
BufferedImage |
static void |
drawUnitGrid(java.awt.Graphics2D g,
GrowingSOM gsom,
int width,
int height)
Draws a black grid of units on the
Graphics2D object |
static void |
drawUnitGrid(java.awt.Graphics2D g,
GrowingSOM gsom,
int width,
int height,
java.awt.Color colour)
Draws a grid of units on the
Graphics2D object in the given colour. |
static java.awt.Point |
getUnitCentreLocation(int xPos,
int yPos,
double unitWidth,
double unitHeight) |
static java.awt.Point |
getUnitCentreLocation(Unit unit,
double unitWidth,
double unitHeight) |
static java.awt.Point |
getUnitCentreLocation(Unit unit,
double unitWidth,
double unitHeight,
int offsetX,
int offsetY) |
public static void drawBorder(java.awt.image.BufferedImage buffImage)
public static void drawThickLine(java.awt.Graphics2D g, int x1, int y1, int x2, int y2, int lineWidth, int lineHeight)
public static void drawThickLine(java.awt.Graphics2D g, java.awt.Point p1, java.awt.Point p2, int unitWidth, int unitHeight)
public static void drawThickLine(java.awt.Graphics2D g, Unit u1, Unit u2, int unitWidth, int unitHeight)
drawThickLine(Graphics2D, Point, Point, int, int)
public static void drawUnitCentreMarker(java.awt.Graphics2D g, Unit unit, int unitWidth, int unitHeight, int markerWidth, int markerHeight)
public static void drawMarker(java.awt.Graphics2D g, int markerWidth, int markerHeight, java.awt.Point location)
public static void drawUnitGrid(java.awt.image.BufferedImage bufferedImage, GrowingSOM gsom, int width, int height)
BufferedImage
public static void drawUnitGrid(java.awt.Graphics2D g, GrowingSOM gsom, int width, int height)
Graphics2D
objectpublic static void drawUnitGrid(java.awt.Graphics2D g, GrowingSOM gsom, int width, int height, java.awt.Color colour)
Graphics2D
object in the given colour. The width of the grid lines depends
on the image resolution, and is 1/20 of the unit width.public static java.awt.Point getUnitCentreLocation(int xPos, int yPos, double unitWidth, double unitHeight)
public static java.awt.Point getUnitCentreLocation(Unit unit, double unitWidth, double unitHeight)
public static java.awt.Point getUnitCentreLocation(Unit unit, double unitWidth, double unitHeight, int offsetX, int offsetY)