mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
86 lines
3.0 KiB
C
86 lines
3.0 KiB
C
|
/* a*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||
|
/* 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/. */
|
||
|
|
||
|
#ifndef mozilla_dom_SVGFEMorphologyElement_h
|
||
|
#define mozilla_dom_SVGFEMorphologyElement_h
|
||
|
|
||
|
#include "nsSVGFilters.h"
|
||
|
|
||
|
namespace mozilla {
|
||
|
namespace dom {
|
||
|
|
||
|
typedef nsSVGFE nsSVGFEMorphologyElementBase;
|
||
|
|
||
|
class nsSVGFEMorphologyElement : public nsSVGFEMorphologyElementBase,
|
||
|
public nsIDOMSVGFEMorphologyElement
|
||
|
{
|
||
|
friend nsresult NS_NewSVGFEMorphologyElement(nsIContent **aResult,
|
||
|
already_AddRefed<nsINodeInfo> aNodeInfo);
|
||
|
protected:
|
||
|
nsSVGFEMorphologyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||
|
: nsSVGFEMorphologyElementBase(aNodeInfo) {}
|
||
|
|
||
|
public:
|
||
|
// interfaces:
|
||
|
NS_DECL_ISUPPORTS_INHERITED
|
||
|
|
||
|
// FE Base
|
||
|
NS_FORWARD_NSIDOMSVGFILTERPRIMITIVESTANDARDATTRIBUTES(nsSVGFEMorphologyElementBase::)
|
||
|
|
||
|
virtual nsresult Filter(nsSVGFilterInstance* aInstance,
|
||
|
const nsTArray<const Image*>& aSources,
|
||
|
const Image* aTarget,
|
||
|
const nsIntRect& aDataRect);
|
||
|
virtual bool AttributeAffectsRendering(
|
||
|
int32_t aNameSpaceID, nsIAtom* aAttribute) const;
|
||
|
virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
|
||
|
virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
|
||
|
virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
|
||
|
const nsSVGFilterInstance& aInstance);
|
||
|
virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
|
||
|
nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
|
||
|
virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
|
||
|
const nsSVGFilterInstance& aInstance);
|
||
|
|
||
|
// Morphology
|
||
|
NS_DECL_NSIDOMSVGFEMORPHOLOGYELEMENT
|
||
|
|
||
|
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGFEMorphologyElementBase::)
|
||
|
|
||
|
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||
|
|
||
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||
|
|
||
|
virtual nsXPCClassInfo* GetClassInfo();
|
||
|
|
||
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||
|
protected:
|
||
|
void GetRXY(int32_t *aRX, int32_t *aRY, const nsSVGFilterInstance& aInstance);
|
||
|
nsIntRect InflateRect(const nsIntRect& aRect, const nsSVGFilterInstance& aInstance);
|
||
|
|
||
|
virtual NumberPairAttributesInfo GetNumberPairInfo();
|
||
|
virtual EnumAttributesInfo GetEnumInfo();
|
||
|
virtual StringAttributesInfo GetStringInfo();
|
||
|
|
||
|
enum { RADIUS };
|
||
|
nsSVGNumberPair mNumberPairAttributes[1];
|
||
|
static NumberPairInfo sNumberPairInfo[1];
|
||
|
|
||
|
enum { OPERATOR };
|
||
|
nsSVGEnum mEnumAttributes[1];
|
||
|
static nsSVGEnumMapping sOperatorMap[];
|
||
|
static EnumInfo sEnumInfo[1];
|
||
|
|
||
|
enum { RESULT, IN1 };
|
||
|
nsSVGString mStringAttributes[2];
|
||
|
static StringInfo sStringInfo[2];
|
||
|
};
|
||
|
|
||
|
} // namespace dom
|
||
|
} // namespace mozilla
|
||
|
|
||
|
#endif // mozilla_dom_SVGFEMorphologyElement_h
|