Platform
Date: 2019-10-22

org.jmol.awtjs

## 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 org.jmol.api.GenericPlatform

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Platform()`

  - ### Method Summary

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

    - ### Methods inherited from class org.jmol.awtjs2d.Platform

      `allocateRgbImage, convertPointFromScreen, createImage, disposeGraphics, drawImageToBuffer, flushImage, fontStringWidth, forceAsyncLoad, getBufferedFileInputStream, getDateFormat, getFontAscent, getFontDescent, getFontMetrics, getFullScreenDimensions, getImageDialog, getImageHeight, getImageWidth, 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 java.lang.Object

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

- - ### Constructor Detail

    - #### Platform

          public Platform()

  - ### Method Detail

    - #### drawImage

          public void drawImage(java.lang.Object g,
                                java.lang.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(java.lang.String text,
                                     Font font3d,
                                     java.lang.Object gObj,
                                     java.lang.Object image,
                                     int width,
                                     int height,
                                     int ascent)

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

    - #### getGraphics

          public java.lang.Object getGraphics(java.lang.Object image)

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

    - #### getStaticGraphics

          public java.lang.Object getStaticGraphics(java.lang.Object image,
                                                    boolean backgroundTransparent)

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

    - #### newBufferedImage

          public java.lang.Object newBufferedImage(java.lang.Object image,
                                                   int w,
                                                   int h)

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

    - #### newOffScreenImage

          public java.lang.Object newOffScreenImage(int w,
                                                    int h)

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