JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.host.html

Class HTMLCanvasElement

    • Constructor Detail

      • HTMLCanvasElement

        public HTMLCanvasElement()
    • Method Detail

      • getWidth

        public int getWidth()
        Returns the width property.
        Returns:
        the width property
      • setWidth

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

        public int getHeight()
        Returns the height property.
        Returns:
        the height property
      • setHeight

        public void setHeight(int height)
        Sets the height property.
        Parameters:
        height - the height property
      • getContext

        public HtmlUnitScriptable getContext(String contextId)
        Gets the context.
        Parameters:
        contextId - the context id
        Returns:
        Returns an object that exposes an API for drawing on the canvas, or null if the given context ID is not supported
      • toDataURL

        public String toDataURL(Object type)
        Get the data: URL representation of the Canvas element. Here we return an empty image.
        Parameters:
        type - the type (optional)
        Returns:
        the data URL
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /