| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 { | 45 { |
| 46 return adoptRef(new SVGViewSpec(contextElement)); | 46 return adoptRef(new SVGViewSpec(contextElement)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool parseViewSpec(const String&); | 49 bool parseViewSpec(const String&); |
| 50 void reset(); | 50 void reset(); |
| 51 | 51 |
| 52 SVGElement* viewTarget() const; | 52 SVGElement* viewTarget() const; |
| 53 String viewBoxString() const; | 53 String viewBoxString() const; |
| 54 | 54 |
| 55 void setPreserveAspectRatioString(const String&); | |
| 56 String preserveAspectRatioString() const; | 55 String preserveAspectRatioString() const; |
| 57 | 56 |
| 58 void setTransformString(const String&); | 57 void setTransformString(const String&); |
| 59 String transformString() const; | 58 String transformString() const; |
| 60 | 59 |
| 61 void setViewTargetString(const String& string) { m_viewTargetString = string
; } | 60 void setViewTargetString(const String& string) { m_viewTargetString = string
; } |
| 62 String viewTargetString() const { return m_viewTargetString; } | 61 String viewTargetString() const { return m_viewTargetString; } |
| 63 | 62 |
| 64 SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; } | 63 SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; } |
| 65 void setZoomAndPan(unsigned short zoomAndPan) { setZoomAndPanBaseValue(zoomA
ndPan); } | 64 void setZoomAndPan(unsigned short zoomAndPan) { setZoomAndPanBaseValue(zoomA
ndPan); } |
| 66 void setZoomAndPan(unsigned short, ExceptionCode&); | 65 void setZoomAndPan(unsigned short, ExceptionCode&); |
| 67 void setZoomAndPanBaseValue(unsigned short zoomAndPan) { m_zoomAndPan = SVGZ
oomAndPan::parseFromNumber(zoomAndPan); } | 66 void setZoomAndPanBaseValue(unsigned short zoomAndPan) { m_zoomAndPan = SVGZ
oomAndPan::parseFromNumber(zoomAndPan); } |
| 68 | 67 |
| 69 SVGElement* contextElement() const { return m_contextElement; } | 68 SVGElement* contextElement() const { return m_contextElement; } |
| 70 void resetContextElement() { m_contextElement = 0; } | 69 void resetContextElement() { m_contextElement = 0; } |
| 71 | 70 |
| 72 // Custom non-animated 'transform' property. | 71 // Custom non-animated 'transform' property. |
| 73 SVGTransformListPropertyTearOff* transform(); | 72 SVGTransformListPropertyTearOff* transform(); |
| 74 SVGTransformList transformBaseValue() const { return m_transform; } | 73 SVGTransformList transformBaseValue() const { return m_transform; } |
| 75 | 74 |
| 76 // Custom animated 'viewBox' property. | 75 // Custom animated 'viewBox' property. |
| 77 PassRefPtr<SVGAnimatedRect> viewBoxAnimated() | 76 PassRefPtr<SVGAnimatedRect> viewBoxAnimated(); |
| 78 { | |
| 79 return static_pointer_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper
(this)); | |
| 80 } | |
| 81 | |
| 82 FloatRect& viewBox() { return m_viewBox; } | 77 FloatRect& viewBox() { return m_viewBox; } |
| 83 FloatRect viewBoxBaseValue() const { return m_viewBox; } | 78 FloatRect viewBoxBaseValue() const { return m_viewBox; } |
| 84 void setViewBoxBaseValue(const FloatRect& viewBox) { m_viewBox = viewBox; } | 79 void setViewBoxBaseValue(const FloatRect& viewBox) { m_viewBox = viewBox; } |
| 85 | 80 |
| 86 // Custom animated 'preserveAspectRatio' property. | 81 // Custom animated 'preserveAspectRatio' property. |
| 87 PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated() | 82 PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated(); |
| 88 { | |
| 89 return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreat
ePreserveAspectRatioWrapper(this)); | |
| 90 } | |
| 91 | |
| 92 SVGPreserveAspectRatio& preserveAspectRatio() { return m_preserveAspectRatio
; } | 83 SVGPreserveAspectRatio& preserveAspectRatio() { return m_preserveAspectRatio
; } |
| 93 SVGPreserveAspectRatio preserveAspectRatioBaseValue() const { return m_prese
rveAspectRatio; } | 84 SVGPreserveAspectRatio preserveAspectRatioBaseValue() const { return m_prese
rveAspectRatio; } |
| 94 void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio& preserveA
spectRatio) { m_preserveAspectRatio = preserveAspectRatio; } | 85 void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio& preserveA
spectRatio) { m_preserveAspectRatio = preserveAspectRatio; } |
| 95 | 86 |
| 96 private: | 87 private: |
| 97 SVGViewSpec(SVGElement*); | 88 SVGViewSpec(SVGElement*); |
| 98 | 89 |
| 99 static const SVGPropertyInfo* transformPropertyInfo(); | 90 static const SVGPropertyInfo* transformPropertyInfo(); |
| 100 static const SVGPropertyInfo* viewBoxPropertyInfo(); | 91 static const SVGPropertyInfo* viewBoxPropertyInfo(); |
| 101 static const SVGPropertyInfo* preserveAspectRatioPropertyInfo(); | 92 static const SVGPropertyInfo* preserveAspectRatioPropertyInfo(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 114 SVGTransformList m_transform; | 105 SVGTransformList m_transform; |
| 115 FloatRect m_viewBox; | 106 FloatRect m_viewBox; |
| 116 SVGPreserveAspectRatio m_preserveAspectRatio; | 107 SVGPreserveAspectRatio m_preserveAspectRatio; |
| 117 String m_viewTargetString; | 108 String m_viewTargetString; |
| 118 }; | 109 }; |
| 119 | 110 |
| 120 } // namespace WebCore | 111 } // namespace WebCore |
| 121 | 112 |
| 122 #endif // ENABLE(SVG) | 113 #endif // ENABLE(SVG) |
| 123 #endif | 114 #endif |
| OLD | NEW |