Path: blob/trunk/third_party/closure/goog/graphics/rectelement.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 rectangles.17* @author [email protected] (Erik Arvidsson)18*/192021goog.provide('goog.graphics.RectElement');2223goog.require('goog.graphics.StrokeAndFillElement');24252627/**28* Interface for a graphics rectangle element.29* You should not construct objects from this constructor. The graphics30* will return an implementation of this interface for you.31* @param {Element} element The DOM element to wrap.32* @param {goog.graphics.AbstractGraphics} graphics The graphics creating33* this element.34* @param {goog.graphics.Stroke?} stroke The stroke to use for this element.35* @param {goog.graphics.Fill?} fill The fill to use for this element.36* @constructor37* @extends {goog.graphics.StrokeAndFillElement}38* @deprecated goog.graphics is deprecated. It existed to abstract over browser39* differences before the canvas tag was widely supported. See40* http://en.wikipedia.org/wiki/Canvas_element for details.41*/42goog.graphics.RectElement = function(element, graphics, stroke, fill) {43goog.graphics.StrokeAndFillElement.call(44this, element, graphics, stroke, fill);45};46goog.inherits(goog.graphics.RectElement, goog.graphics.StrokeAndFillElement);474849/**50* Update the position of the rectangle.51* @param {number} x X coordinate (left).52* @param {number} y Y coordinate (top).53*/54goog.graphics.RectElement.prototype.setPosition = goog.abstractMethod;555657/**58* Update the size of the rectangle.59* @param {number} width Width of rectangle.60* @param {number} height Height of rectangle.61*/62goog.graphics.RectElement.prototype.setSize = goog.abstractMethod;636465