| 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 paths. |
| 18 |
* @author [email protected] (Erik Arvidsson) |
| 19 |
*/ |
| 20 |
|
| 21 |
|
| 22 |
goog.provide('goog.graphics.PathElement'); |
| 23 |
|
| 24 |
goog.require('goog.graphics.StrokeAndFillElement'); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
/** |
| 29 |
* Interface for a graphics path element. |
| 30 |
* You should not construct objects from this constructor. The graphics |
| 31 |
* will return an implementation of this interface for you. |
| 32 |
* @param {Element} element The DOM element to wrap. |
| 33 |
* @param {goog.graphics.AbstractGraphics} graphics The graphics creating |
| 34 |
* 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 |
* @constructor |
| 38 |
* @extends {goog.graphics.StrokeAndFillElement} |
| 39 |
* @deprecated goog.graphics is deprecated. It existed to abstract over browser |
| 40 |
* differences before the canvas tag was widely supported. See |
| 41 |
* http://en.wikipedia.org/wiki/Canvas_element for details. |
| 42 |
*/ |
| 43 |
goog.graphics.PathElement = function(element, graphics, stroke, fill) { |
| 44 |
goog.graphics.StrokeAndFillElement.call( |
| 45 |
this, element, graphics, stroke, fill); |
| 46 |
}; |
| 47 |
goog.inherits(goog.graphics.PathElement, goog.graphics.StrokeAndFillElement); |
| 48 |
|
| 49 |
|
| 50 |
/** |
| 51 |
* Update the underlying path. |
| 52 |
* @param {!goog.graphics.Path} path The path object to draw. |
| 53 |
*/ |
| 54 |
goog.graphics.PathElement.prototype.setPath = goog.abstractMethod; |