org.nlogo.api
Class Graphics2DWrapper
java.lang.Object
org.nlogo.api.Graphics2DWrapper
- All Implemented Interfaces:
- GraphicsInterface
public class Graphics2DWrapper
- extends Object
- implements GraphicsInterface
Method Summary |
void |
antiAliasing(boolean on)
|
void |
dispose()
|
void |
draw(Shape shape)
|
void |
drawCircle(double x,
double y,
double xDiameter,
double yDiameter,
double scale,
double angle)
|
void |
drawImage(BufferedImage image)
|
void |
drawImage(Image image,
int x,
int y,
int width,
int height)
|
void |
drawLabel(String label,
double x,
double y,
double patchSize)
|
void |
drawLine(double x1,
double y1,
double x2,
double y2)
|
void |
drawPolygon(int[] xcors,
int[] ycors,
int length)
|
void |
drawPolyline(int[] xcors,
int[] ycors,
int length)
|
void |
drawRect(double x,
double y,
double width,
double height,
double scale,
double angle)
|
void |
fill(Shape shape)
|
void |
fillCircle(double x,
double y,
double xDiameter,
double yDiameter,
double scale,
double angle)
|
void |
fillPolygon(int[] xcors,
int[] ycors,
int length)
|
void |
fillRect(double x,
double y,
double width,
double height,
double scale,
double angle)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
FontMetrics |
getFontMetrics()
|
String |
location(double x,
double y)
|
void |
pop()
|
void |
push()
|
void |
rotate(double theta)
|
void |
rotate(double theta,
double x,
double y)
|
void |
rotate(double theta,
double x,
double y,
double offset)
|
void |
scale(double x,
double y)
|
void |
scale(double x,
double y,
double shapeWidth)
|
void |
setColor(Color c)
|
void |
setComposite(Composite comp)
|
void |
setInterpolation()
|
void |
setPenWidth(double penSize)
|
void |
setStroke(double width)
|
void |
setStroke(float width,
float[] dashes)
|
void |
setStrokeControl()
|
void |
setStrokeFromLineThickness(double lineThickness,
double scale,
double cellSize,
double shapeWidth)
|
void |
translate(double x,
double y)
|
Graphics2DWrapper
public Graphics2DWrapper(Graphics2D g)
location
public String location(double x,
double y)
- Specified by:
location
in interface GraphicsInterface
draw
public void draw(Shape shape)
- Specified by:
draw
in interface GraphicsInterface
drawImage
public void drawImage(BufferedImage image)
- Specified by:
drawImage
in interface GraphicsInterface
drawImage
public void drawImage(Image image,
int x,
int y,
int width,
int height)
- Specified by:
drawImage
in interface GraphicsInterface
drawLine
public void drawLine(double x1,
double y1,
double x2,
double y2)
- Specified by:
drawLine
in interface GraphicsInterface
drawLabel
public void drawLabel(String label,
double x,
double y,
double patchSize)
- Specified by:
drawLabel
in interface GraphicsInterface
fillCircle
public void fillCircle(double x,
double y,
double xDiameter,
double yDiameter,
double scale,
double angle)
- Specified by:
fillCircle
in interface GraphicsInterface
drawCircle
public void drawCircle(double x,
double y,
double xDiameter,
double yDiameter,
double scale,
double angle)
- Specified by:
drawCircle
in interface GraphicsInterface
fillRect
public void fillRect(double x,
double y,
double width,
double height,
double scale,
double angle)
- Specified by:
fillRect
in interface GraphicsInterface
drawRect
public void drawRect(double x,
double y,
double width,
double height,
double scale,
double angle)
- Specified by:
drawRect
in interface GraphicsInterface
fill
public void fill(Shape shape)
- Specified by:
fill
in interface GraphicsInterface
fillRect
public void fillRect(int x,
int y,
int width,
int height)
- Specified by:
fillRect
in interface GraphicsInterface
pop
public void pop()
- Specified by:
pop
in interface GraphicsInterface
push
public void push()
- Specified by:
push
in interface GraphicsInterface
rotate
public void rotate(double theta)
- Specified by:
rotate
in interface GraphicsInterface
rotate
public void rotate(double theta,
double x,
double y)
- Specified by:
rotate
in interface GraphicsInterface
rotate
public void rotate(double theta,
double x,
double y,
double offset)
- Specified by:
rotate
in interface GraphicsInterface
scale
public void scale(double x,
double y)
- Specified by:
scale
in interface GraphicsInterface
scale
public void scale(double x,
double y,
double shapeWidth)
- Specified by:
scale
in interface GraphicsInterface
antiAliasing
public void antiAliasing(boolean on)
- Specified by:
antiAliasing
in interface GraphicsInterface
setInterpolation
public void setInterpolation()
- Specified by:
setInterpolation
in interface GraphicsInterface
setStrokeControl
public void setStrokeControl()
- Specified by:
setStrokeControl
in interface GraphicsInterface
setColor
public void setColor(Color c)
- Specified by:
setColor
in interface GraphicsInterface
setComposite
public void setComposite(Composite comp)
- Specified by:
setComposite
in interface GraphicsInterface
setStroke
public void setStroke(double width)
- Specified by:
setStroke
in interface GraphicsInterface
setStrokeFromLineThickness
public void setStrokeFromLineThickness(double lineThickness,
double scale,
double cellSize,
double shapeWidth)
- Specified by:
setStrokeFromLineThickness
in interface GraphicsInterface
setStroke
public void setStroke(float width,
float[] dashes)
- Specified by:
setStroke
in interface GraphicsInterface
setPenWidth
public void setPenWidth(double penSize)
translate
public void translate(double x,
double y)
- Specified by:
translate
in interface GraphicsInterface
drawPolygon
public void drawPolygon(int[] xcors,
int[] ycors,
int length)
- Specified by:
drawPolygon
in interface GraphicsInterface
fillPolygon
public void fillPolygon(int[] xcors,
int[] ycors,
int length)
- Specified by:
fillPolygon
in interface GraphicsInterface
drawPolyline
public void drawPolyline(int[] xcors,
int[] ycors,
int length)
- Specified by:
drawPolyline
in interface GraphicsInterface
dispose
public void dispose()
- Specified by:
dispose
in interface GraphicsInterface
getFontMetrics
public FontMetrics getFontMetrics()
- Specified by:
getFontMetrics
in interface GraphicsInterface