Interface HTMLCanvasElement

All Superinterfaces:
Element, EventTarget, HTMLElement, InnerHTML, Node, NonDocumentTypeChildNode, ParentNode
All Known Implementing Classes:
HTMLCanvasElementImpl

public interface HTMLCanvasElement extends HTMLElement
The Interface HTMLCanvasElement.
  • Field Details

  • Method Details

    • getWidth

      int getWidth()
      Gets the width.
      Returns:
      the width
    • setWidth

      void setWidth(int width)
      Sets the width.
      Parameters:
      width - the new width
    • getHeight

      int getHeight()
      Gets the height.
      Returns:
      the height
    • setHeight

      void setHeight(int height)
      Sets the height.
      Parameters:
      height - the new height
    • toDataURL

      String toDataURL()
      To data url.
      Returns:
      the string
    • toDataURL

      String toDataURL(String type, Object... args)
      To data url.
      Parameters:
      type - the type
      args - the args
      Returns:
      the string
    • toBlob

      void toBlob(FileCallback callback)
      To blob.
      Parameters:
      callback - the callback
    • toBlob

      void toBlob(FileCallback callback, String type, Object... args)
      To blob.
      Parameters:
      callback - the callback
      type - the type
      args - the args
    • getContext

      CanvasRenderingContext2D getContext(String contextId)
      Gets the context.
      Parameters:
      contextId - the context id
      Returns:
      the context