# Class Platform

java.lang.Object
org.jmol.awtjs2d.Platform
org.jmol.awtjs.Platform

All Implemented Interfaces:
  `FontManager, GenericPlatform`

public class Platform extends Platform
WebGL interface

Author:
  Bob Hanson

## Field Summary

### Fields inherited from interface GenericPlatform

`CURSOR_CROSSHAIR, CURSOR_DEFAULT, CURSOR_HAND, CURSOR_MOVE, CURSOR_WAIT, CURSOR_ZOOM`

## Constructor Summary

Constructors
Constructor
Description
`Platform()`

## Method Summary

Modifier and Type
Method
Description
`void`
`drawImage(Object g, Object img, int x, int y, int width, int height, boolean isDTI)`
`Object`
`getGraphics(Object image)`
`Object`
`getStaticGraphics(Object image, boolean backgroundTransparent)`
`int[]`
`getTextPixels(String text, Font font3d, Object gObj, Object image, int width, int height, int ascent)`
`Object`
`newBufferedImage(Object image, int w, int h)`
`Object`
`newOffScreenImage(int w, int h)`

### Methods inherited from class Platform

`allocateRgbImage, confirm, convertPointFromScreen, createImage, disposeGraphics, drawImageToBuffer, flushImage, fontStringWidth, forceAsyncLoad, getBufferedFileInputStream, getDateFormat, getFontAscent, getFontDescent, getFontMetrics, getFullScreenDimensions, getImageDialog, getImageHeight, getImageWidth, getInChI, getJsObjectInfo, getLocalUrl, getMenuPopup, getMouseManager, getURLContents, getURLContentsStatic, grabPixels, hasFocus, isHeadless, isSingleThreaded, Jmol, newFile, newFont, notifyEndOfRendering, prompt, renderScreenImage, repaint, requestFocusInWindow, setCursor, setTransparentCursor, setViewer, waitForDisplay`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Platform

public Platform()

## Method Details

### drawImage

public void drawImage(Object g, Object img, int x, int y, int width, int height, boolean isDTI)

Specified by:
  `drawImage` in interface `GenericPlatform`
Overrides:
  `drawImage` in class `Platform`

### getTextPixels

public int[] getTextPixels(String text, Font font3d, Object gObj, Object image, int width, int height, int ascent)

Specified by:
  `getTextPixels` in interface `GenericPlatform`
Overrides:
  `getTextPixels` in class `Platform`

### getGraphics

public Object getGraphics(Object image)

Specified by:
  `getGraphics` in interface `GenericPlatform`
Overrides:
  `getGraphics` in class `Platform`

### getStaticGraphics

public Object getStaticGraphics(Object image, boolean backgroundTransparent)

Specified by:
  `getStaticGraphics` in interface `GenericPlatform`
Overrides:
  `getStaticGraphics` in class `Platform`

### newBufferedImage

public Object newBufferedImage(Object image, int w, int h)

Specified by:
  `newBufferedImage` in interface `GenericPlatform`
Overrides:
  `newBufferedImage` in class `Platform`

### newOffScreenImage

public Object newOffScreenImage(int w, int h)

Specified by:
  `newOffScreenImage` in interface `GenericPlatform`
Overrides:
  `newOffScreenImage` in class `Platform`