Debian Codegraph @

closure-library/closure/goog/graphics/textelement.js

raw
1 // Copyright 2007 The Closure Library Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS-IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15
16 /**
17 * @fileoverview A thin wrapper around the DOM element for text elements.
18 * @author [email protected] (Erik Arvidsson)
19 */
20
21
22 goog.provide('goog.graphics.TextElement');
23
24 goog.require('goog.graphics.StrokeAndFillElement');
25
26
27
28 /**
29 * Interface for a graphics text element.
30 * You should not construct objects from this constructor. The graphics
31 * will return an implementation of this interface for you.
32 *
33 * @param {Element} element The DOM element to wrap.
34 * @param {goog.graphics.AbstractGraphics} graphics The graphics creating
35 * this element.
36 * @param {goog.graphics.Stroke?} stroke The stroke to use for this element.
37 * @param {goog.graphics.Fill?} fill The fill to use for this element.
38 * @constructor
39 * @extends {goog.graphics.StrokeAndFillElement}
40 * @deprecated goog.graphics is deprecated. It existed to abstract over browser
41 * differences before the canvas tag was widely supported. See
42 * http://en.wikipedia.org/wiki/Canvas_element for details.
43 */
44 goog.graphics.TextElement = function(element, graphics, stroke, fill) {
45 goog.graphics.StrokeAndFillElement.call(
46 this, element, graphics, stroke, fill);
47 };
48 goog.inherits(goog.graphics.TextElement, goog.graphics.StrokeAndFillElement);
49
50
51 /**
52 * Update the displayed text of the element.
53 * @param {string} text The text to draw.
54 */
55 goog.graphics.TextElement.prototype.setText = goog.abstractMethod;