2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-08-10 21:03:49 +00:00
|
|
|
|
2010-05-26 20:01:10 +00:00
|
|
|
#ifndef NS_SVGPOLYELEMENT_H_
|
|
|
|
#define NS_SVGPOLYELEMENT_H_
|
|
|
|
|
2013-05-29 20:43:41 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-01-26 09:57:21 +00:00
|
|
|
#include "nsSVGPathGeometryElement.h"
|
2010-12-08 12:15:53 +00:00
|
|
|
#include "SVGAnimatedPointList.h"
|
2006-08-10 21:03:49 +00:00
|
|
|
|
|
|
|
typedef nsSVGPathGeometryElement nsSVGPolyElementBase;
|
|
|
|
|
2013-01-06 09:32:01 +00:00
|
|
|
namespace mozilla {
|
|
|
|
class DOMSVGPointList;
|
|
|
|
}
|
|
|
|
|
2013-01-12 22:21:53 +00:00
|
|
|
class nsSVGPolyElement : public nsSVGPolyElementBase
|
2006-08-10 21:03:49 +00:00
|
|
|
{
|
|
|
|
protected:
|
2014-09-01 01:08:04 +00:00
|
|
|
explicit nsSVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
2006-08-10 21:03:49 +00:00
|
|
|
|
2014-07-08 21:23:16 +00:00
|
|
|
virtual ~nsSVGPolyElement();
|
|
|
|
|
2006-08-10 21:03:49 +00:00
|
|
|
public:
|
|
|
|
//interfaces
|
2013-01-12 22:21:53 +00:00
|
|
|
|
2006-08-10 21:03:49 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIContent interface
|
2015-03-21 16:28:04 +00:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
|
2010-12-08 12:15:53 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual SVGAnimatedPointList* GetAnimatedPointList() override {
|
2010-12-08 12:15:53 +00:00
|
|
|
return &mPoints;
|
|
|
|
}
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsIAtom* GetPointListAttrName() const override {
|
2010-12-08 12:15:53 +00:00
|
|
|
return nsGkAtoms::points;
|
|
|
|
}
|
|
|
|
|
2014-02-19 20:46:43 +00:00
|
|
|
// nsSVGElement methods:
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool HasValidDimensions() const override;
|
2014-02-19 20:46:43 +00:00
|
|
|
|
2006-08-10 21:03:49 +00:00
|
|
|
// nsSVGPathGeometryElement methods:
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool AttributeDefinesGeometry(const nsIAtom *aName) override;
|
|
|
|
virtual bool IsMarkable() override { return true; }
|
|
|
|
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
|
2015-02-03 18:36:32 +00:00
|
|
|
virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
|
2015-03-21 16:28:04 +00:00
|
|
|
const Matrix& aTransform) override;
|
2006-08-10 21:03:49 +00:00
|
|
|
|
2013-01-06 09:32:01 +00:00
|
|
|
// WebIDL
|
|
|
|
already_AddRefed<mozilla::DOMSVGPointList> Points();
|
|
|
|
already_AddRefed<mozilla::DOMSVGPointList> AnimatedPoints();
|
|
|
|
|
2006-08-10 21:03:49 +00:00
|
|
|
protected:
|
2010-12-08 12:15:53 +00:00
|
|
|
SVGAnimatedPointList mPoints;
|
2006-08-10 21:03:49 +00:00
|
|
|
};
|
|
|
|
|
2010-05-26 20:01:10 +00:00
|
|
|
#endif //NS_SVGPOLYELEMENT_H_
|