#ifndef RenderSVGResourceRadialGradient_h
#define RenderSVGResourceRadialGradient_h
#include "core/rendering/svg/RenderSVGResourceGradient.h"
#include "core/svg/RadialGradientAttributes.h"
namespace WebCore {
class SVGRadialGradientElement;
class RenderSVGResourceRadialGradient FINAL : public RenderSVGResourceGradient {
public:
explicit RenderSVGResourceRadialGradient(SVGRadialGradientElement*);
virtual ~RenderSVGResourceRadialGradient();
virtual const char* renderName() const OVERRIDE { return "RenderSVGResourceRadialGradient"; }
virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
virtual SVGUnitTypes::SVGUnitType gradientUnits() const OVERRIDE { return m_attributes.gradientUnits(); }
virtual void calculateGradientTransform(AffineTransform& transform) OVERRIDE { transform = m_attributes.gradientTransform(); }
virtual bool collectGradientAttributes(SVGGradientElement*) OVERRIDE;
virtual void buildGradient(GradientData*) const OVERRIDE;
FloatPoint centerPoint(const RadialGradientAttributes&) const;
FloatPoint focalPoint(const RadialGradientAttributes&) const;
float radius(const RadialGradientAttributes&) const;
float focalRadius(const RadialGradientAttributes&) const;
private:
RadialGradientAttributes m_attributes;
};
DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(RenderSVGResourceRadialGradient, RadialGradientResourceType);
}
#endif