Path: blob/trunk/third_party/closure/goog/graphics/textelement.js
2868 views
// Copyright 2007 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.131415/**16* @fileoverview A thin wrapper around the DOM element for text elements.17* @author [email protected] (Erik Arvidsson)18*/192021goog.provide('goog.graphics.TextElement');2223goog.require('goog.graphics.StrokeAndFillElement');24252627/**28* Interface for a graphics text element.29* You should not construct objects from this constructor. The graphics30* will return an implementation of this interface for you.31*32* @param {Element} element The DOM element to wrap.33* @param {goog.graphics.AbstractGraphics} graphics The graphics creating34* this element.35* @param {goog.graphics.Stroke?} stroke The stroke to use for this element.36* @param {goog.graphics.Fill?} fill The fill to use for this element.37* @constructor38* @extends {goog.graphics.StrokeAndFillElement}39* @deprecated goog.graphics is deprecated. It existed to abstract over browser40* differences before the canvas tag was widely supported. See41* http://en.wikipedia.org/wiki/Canvas_element for details.42*/43goog.graphics.TextElement = function(element, graphics, stroke, fill) {44goog.graphics.StrokeAndFillElement.call(45this, element, graphics, stroke, fill);46};47goog.inherits(goog.graphics.TextElement, goog.graphics.StrokeAndFillElement);484950/**51* Update the displayed text of the element.52* @param {string} text The text to draw.53*/54goog.graphics.TextElement.prototype.setText = goog.abstractMethod;555657