Package org.jmol.awt
Class AwtG2D
java.lang.Object
org.jmol.awt.AwtG2D
- All Implemented Interfaces:
GenericGraphics
generic 2D drawing methods -- AWT version
- Author:
- Bob Hanson hansonr@stolaf.edu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GeneralPath
(package private) BasicStroke
(package private) BasicStroke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
drawCircle
(Object g, int x, int y, int diameter) void
drawGrayScaleImage
(Object g, Object image2d, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1) void
void
drawPolygon
(Object g, int[] axPoints, int[] ayPoints, int nPoints) void
void
drawString
(Object g, String text, int x, int y) void
drawStringRotated
(Object g, String text, int x, int y, double angle) void
fillBackground
(Object g, javajs.api.GenericColor bgcolor) void
fillCircle
(Object g, int x, int y, int diameter) void
fillPolygon
(Object g, int[] ayPoints, int[] axPoints, int nPoints) void
javajs.api.GenericColor
getColor1
(int rgb) javajs.api.GenericColor
getColor3
(int r, int g, int b) javajs.api.GenericColor
getColor4
(int r, int g, int b, int a) void
newGrayScaleImage
(Object gMain, Object image, int width, int height, int[] buffer) void
setGraphicsColor
(Object g, javajs.api.GenericColor c) void
setStrokeBold
(Object g, boolean tf) void
setWindowParameters
(int width, int height) void
translateScale
(Object g, double x, double y, double scale)
-
Field Details
-
strokeBasic
BasicStroke strokeBasic -
strokeBold
BasicStroke strokeBold -
path
-
-
Constructor Details
-
AwtG2D
public AwtG2D()
-
-
Method Details
-
getColor4
public javajs.api.GenericColor getColor4(int r, int g, int b, int a) - Specified by:
getColor4
in interfaceGenericGraphics
-
getColor3
public javajs.api.GenericColor getColor3(int r, int g, int b) - Specified by:
getColor3
in interfaceGenericGraphics
-
getColor1
public javajs.api.GenericColor getColor1(int rgb) - Specified by:
getColor1
in interfaceGenericGraphics
-
drawString
- Specified by:
drawString
in interfaceGenericGraphics
-
drawStringRotated
- Specified by:
drawStringRotated
in interfaceGenericGraphics
-
setGraphicsColor
- Specified by:
setGraphicsColor
in interfaceGenericGraphics
-
setFont
- Specified by:
setFont
in interfaceGenericGraphics
-
drawGrayScaleImage
public void drawGrayScaleImage(Object g, Object image2d, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1) - Specified by:
drawGrayScaleImage
in interfaceGenericGraphics
-
newGrayScaleImage
- Specified by:
newGrayScaleImage
in interfaceGenericGraphics
-
fillRect
- Specified by:
fillRect
in interfaceGenericGraphics
-
drawLine
- Specified by:
drawLine
in interfaceGenericGraphics
-
drawRect
- Specified by:
drawRect
in interfaceGenericGraphics
-
drawCircle
- Specified by:
drawCircle
in interfaceGenericGraphics
-
drawPolygon
- Specified by:
drawPolygon
in interfaceGenericGraphics
-
fillCircle
- Specified by:
fillCircle
in interfaceGenericGraphics
-
fillPolygon
- Specified by:
fillPolygon
in interfaceGenericGraphics
-
translateScale
- Specified by:
translateScale
in interfaceGenericGraphics
-
setStrokeBold
- Specified by:
setStrokeBold
in interfaceGenericGraphics
-
fillBackground
- Specified by:
fillBackground
in interfaceGenericGraphics
-
setWindowParameters
public void setWindowParameters(int width, int height) - Specified by:
setWindowParameters
in interfaceGenericGraphics
-
canDoLineTo
public boolean canDoLineTo()- Specified by:
canDoLineTo
in interfaceGenericGraphics
-
doStroke
- Specified by:
doStroke
in interfaceGenericGraphics
-
lineTo
- Specified by:
lineTo
in interfaceGenericGraphics
-