public class ImageAugmenter
extends java.lang.Object
| Constructor and Description |
|---|
ImageAugmenter(java.lang.String imgFileLoc) |
ImageAugmenter(java.lang.String imgFileLoc,
boolean yFromBottom) |
| Modifier and Type | Method and Description |
|---|---|
void |
cropImage(int newWidth,
int newHeight,
int left,
int top) |
void |
drawCircle(int x,
int y,
int diameter,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth) |
void |
drawShape(java.awt.Shape shape,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth) |
void |
drawTriangle(int x,
int y,
int diameter,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth) |
int |
getHeight() |
static int[] |
getTriangleCoords(int[] centerCoords,
int staDiameter,
float staStrokeWidth) |
int |
getWidth() |
boolean |
getYFromBottom() |
static void |
main(java.lang.String[] args) |
void |
outputToPNG(java.io.File file) |
void |
outputToPNG(java.io.OutputStream out) |
void |
outputToPNG(java.lang.String filename) |
static java.lang.String |
printIntArray(int[] ints) |
static void |
setAntialiasingOn(java.awt.Graphics2D g2d) |
void |
setYFromBottom(boolean b) |
int |
translateCoord(int center,
int length) |
int |
translateY(int y) |
public ImageAugmenter(java.lang.String imgFileLoc)
throws java.io.IOException
java.io.IOExceptionpublic ImageAugmenter(java.lang.String imgFileLoc,
boolean yFromBottom)
throws java.io.IOException
java.io.IOExceptionpublic void drawShape(java.awt.Shape shape,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth)
public void drawTriangle(int x,
int y,
int diameter,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth)
public void drawCircle(int x,
int y,
int diameter,
java.awt.Paint fill,
java.awt.Paint strokePaint,
float strokeWidth)
public int translateCoord(int center,
int length)
public int translateY(int y)
public void cropImage(int newWidth,
int newHeight,
int left,
int top)
public void outputToPNG(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic void outputToPNG(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic void outputToPNG(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic int getWidth()
public int getHeight()
public boolean getYFromBottom()
public void setYFromBottom(boolean b)
public static void setAntialiasingOn(java.awt.Graphics2D g2d)
public static int[] getTriangleCoords(int[] centerCoords,
int staDiameter,
float staStrokeWidth)
public static java.lang.String printIntArray(int[] ints)
public static void main(java.lang.String[] args)