Package org.jmol.awtjs2d
Class JsG2D
java.lang.Object
org.jmol.awtjs2d.JsG2D
- All Implemented Interfaces:
GenericGraphics
generic 2D drawing methods -- JavaScript version
- Author:
- Bob Hanson hansonr@stolaf.edu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
drawCircle
(Object g, int x, int y, int diameter) void
drawGrayScaleImage
(Object g, Object image, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1) void
void
drawPolygon
(Object g, int[] ayPoints, int[] axPoints, int nPoints) void
void
drawString
(Object g, String s, int x, int y) void
drawStringRotated
(Object g, String s, int x, int y, double angle) void
fillBackground
(Object g, GenericColor bgcolor) void
fillCircle
(Object g, int x, int y, int diameter) void
fillPolygon
(Object g, int[] ayPoints, int[] axPoints, int nPoints) void
getColor1
(int rgb) getColor3
(int r, int g, int b) getColor4
(int r, int g, int b, int a) void
newGrayScaleImage
(Object context, Object image, int width, int height, int[] grayBuffer) void
void
setStrokeBold
(Object g, boolean tf) void
setWindowParameters
(int width, int height) void
translateScale
(Object g, double x, double y, double scale)
-
Constructor Details
-
JsG2D
public JsG2D()
-
-
Method Details
-
getColor4
- Specified by:
getColor4
in interfaceGenericGraphics
-
getColor3
- Specified by:
getColor3
in interfaceGenericGraphics
-
getColor1
- Specified by:
getColor1
in interfaceGenericGraphics
-
newGrayScaleImage
public Object newGrayScaleImage(Object context, Object image, int width, int height, int[] grayBuffer) - Specified by:
newGrayScaleImage
in interfaceGenericGraphics
-
drawGrayScaleImage
public void drawGrayScaleImage(Object g, Object image, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1) - Specified by:
drawGrayScaleImage
in interfaceGenericGraphics
-
drawLine
- Specified by:
drawLine
in interfaceGenericGraphics
-
drawCircle
- Specified by:
drawCircle
in interfaceGenericGraphics
-
drawPolygon
- Specified by:
drawPolygon
in interfaceGenericGraphics
-
drawRect
- Specified by:
drawRect
in interfaceGenericGraphics
-
drawString
- Specified by:
drawString
in interfaceGenericGraphics
-
drawStringRotated
- Specified by:
drawStringRotated
in interfaceGenericGraphics
-
fillBackground
- Specified by:
fillBackground
in interfaceGenericGraphics
-
fillCircle
- Specified by:
fillCircle
in interfaceGenericGraphics
-
fillPolygon
- Specified by:
fillPolygon
in interfaceGenericGraphics
-
fillRect
- Specified by:
fillRect
in interfaceGenericGraphics
-
setGraphicsColor
- Specified by:
setGraphicsColor
in interfaceGenericGraphics
-
setFont
- Specified by:
setFont
in interfaceGenericGraphics
-
setStrokeBold
- Specified by:
setStrokeBold
in interfaceGenericGraphics
-
setWindowParameters
public void setWindowParameters(int width, int height) - Specified by:
setWindowParameters
in interfaceGenericGraphics
-
translateScale
- Specified by:
translateScale
in interfaceGenericGraphics
-
canDoLineTo
public boolean canDoLineTo()- Specified by:
canDoLineTo
in interfaceGenericGraphics
-
doStroke
- Specified by:
doStroke
in interfaceGenericGraphics
-
lineTo
- Specified by:
lineTo
in interfaceGenericGraphics
-