UNPKG

typescript-closure-tools

Version:

Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files

52 lines (44 loc) 2.03 kB
/// <reference path="../../../globals.d.ts" /> /// <reference path="./element.d.ts" /> /// <reference path="./abstractgraphics.d.ts" /> declare module goog.graphics { class ImageElement extends ImageElement__Class { } /** Fake class which should be extended to avoid inheriting static properties */ class ImageElement__Class extends goog.graphics.Element__Class { /** * Interface for a graphics image element. * You should not construct objects from this constructor. Instead, * you should use {@code goog.graphics.Graphics.drawImage} and it * will return an implementation of this interface for you. * * @param {Element} element The DOM element to wrap. * @param {goog.graphics.AbstractGraphics} graphics The graphics creating * this element. * @constructor * @extends {goog.graphics.Element} * @deprecated goog.graphics is deprecated. It existed to abstract over browser * differences before the canvas tag was widely supported. See * http://en.wikipedia.org/wiki/Canvas_element for details. */ constructor(element: Element, graphics: goog.graphics.AbstractGraphics); /** * Update the position of the image. * * @param {number} x X coordinate (left). * @param {number} y Y coordinate (top). */ setPosition(x: number, y: number): void; /** * Update the size of the image. * * @param {number} width Width of image. * @param {number} height Height of image. */ setSize(width: number, height: number): void; /** * Update the source of the image. * @param {string} src Source of the image. */ setSource(src: string): void; } }