File indexing completed on 2024-05-12 15:39:16
0001 /* 0002 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 0003 * 0004 * Redistribution and use in source and binary forms, with or without 0005 * modification, are permitted provided that the following conditions 0006 * are met: 0007 * 1. Redistributions of source code must retain the above copyright 0008 * notice, this list of conditions and the following disclaimer. 0009 * 2. Redistributions in binary form must reproduce the above copyright 0010 * notice, this list of conditions and the following disclaimer in the 0011 * documentation and/or other materials provided with the distribution. 0012 * 0013 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 0014 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0015 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 0016 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 0017 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0018 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 0019 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 0020 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 0021 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0022 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 0023 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0024 */ 0025 0026 #include "wtf/Platform.h" 0027 0028 #if ENABLE(SVG) 0029 #include "SVGPaintServerRadialGradient.h" 0030 /*#include "SVGRenderTreeAsText.h"*/ 0031 0032 namespace WebCore 0033 { 0034 0035 SVGPaintServerRadialGradient::SVGPaintServerRadialGradient(const SVGGradientElement *owner) 0036 : SVGPaintServerGradient(owner) 0037 , m_radius(0.0f) 0038 { 0039 } 0040 0041 SVGPaintServerRadialGradient::~SVGPaintServerRadialGradient() 0042 { 0043 } 0044 0045 FloatPoint SVGPaintServerRadialGradient::gradientCenter() const 0046 { 0047 return m_center; 0048 } 0049 0050 void SVGPaintServerRadialGradient::setGradientCenter(const FloatPoint ¢er) 0051 { 0052 m_center = center; 0053 } 0054 0055 FloatPoint SVGPaintServerRadialGradient::gradientFocal() const 0056 { 0057 return m_focal; 0058 } 0059 0060 void SVGPaintServerRadialGradient::setGradientFocal(const FloatPoint &focal) 0061 { 0062 m_focal = focal; 0063 } 0064 0065 float SVGPaintServerRadialGradient::gradientRadius() const 0066 { 0067 return m_radius; 0068 } 0069 0070 void SVGPaintServerRadialGradient::setGradientRadius(float radius) 0071 { 0072 m_radius = radius; 0073 } 0074 0075 /*TextStream& SVGPaintServerRadialGradient::externalRepresentation(TextStream& ts) const 0076 { 0077 ts << "[type=RADIAL-GRADIENT] "; 0078 SVGPaintServerGradient::externalRepresentation(ts); 0079 ts << " [center=" << gradientCenter() << "]" 0080 << " [focal=" << gradientFocal() << "]" 0081 << " [radius=" << gradientRadius() << "]"; 0082 return ts; 0083 }*/ 0084 0085 } // namespace WebCore 0086 0087 #endif