blob: 7489ee9f654c20bfa9c654bb8f4d88f6afb651e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// Copyright 2007 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview A thin wrapper around the DOM element for images.
*/
goog.provide('goog.graphics.ImageElement');
goog.require('goog.graphics.Element');
/**
* 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}
*/
goog.graphics.ImageElement = function(element, graphics) {
goog.graphics.Element.call(this, element, graphics);
};
goog.inherits(goog.graphics.ImageElement, goog.graphics.Element);
/**
* Update the position of the image.
*
* @param {number} x X coordinate (left).
* @param {number} y Y coordinate (top).
*/
goog.graphics.ImageElement.prototype.setPosition = goog.abstractMethod;
/**
* Update the size of the image.
*
* @param {number} width Width of image.
* @param {number} height Height of image.
*/
goog.graphics.ImageElement.prototype.setSize = goog.abstractMethod;
/**
* Update the source of the image.
* @param {string} src Source of the image.
*/
goog.graphics.ImageElement.prototype.setSource = goog.abstractMethod;
|