SVG API
SVG 提供了圓形、矩形以及簡單和複雜曲線的元素。這些元素的屬性值指定了它們的繪製方式。**SVG API** 是 **DOM** 的一個子集,它透過在記憶體中表示這些 SVG 元素及其屬性值,將它們與指令碼或程式語言連線起來。因此,SVG API 提供了允許以程式設計方式訪問 SVG 元素及其屬性值的方法。
SVG API 是一組被劃分為以下幾大類別的介面
- 元素介面 提供對 SVG 元素屬性的訪問以及操作它們的方法。
- 靜態資料型別 介面提供對元素屬性值的訪問以及操作它們的方法。
- 對於可動畫化的屬性,動畫資料型別介面 提供對屬性當前動畫值的只讀訪問。
- 同步多媒體整合語言 (SMIL) 介面
- 其他
介面
SVG 元素介面
SVGAElementSVGAnimationElementSVGAnimateElementSVGAnimateMotionElementSVGAnimateTransformElementSVGCircleElementSVGClipPathElementSVGComponentTransferFunctionElementSVGDefsElementSVGDescElementSVGDiscardElementSVGElementSVGEllipseElementSVGFEBlendElementSVGFEColorMatrixElementSVGFEComponentTransferElementSVGFECompositeElementSVGFEConvolveMatrixElementSVGFEDiffuseLightingElementSVGFEDisplacementMapElementSVGFEDistantLightElementSVGFEDropShadowElementSVGFEFloodElementSVGFEFuncAElementSVGFEFuncBElementSVGFEFuncGElementSVGFEFuncRElementSVGFEGaussianBlurElementSVGFEImageElementSVGFEMergeElementSVGFEMergeNodeElementSVGFEMorphologyElementSVGFEOffsetElementSVGFEPointLightElementSVGFESpecularLightingElementSVGFESpotLightElementSVGFETileElementSVGFETurbulenceElementSVGFilterElementSVGForeignObjectElementSVGGElementSVGGeometryElementSVGGradientElementSVGGraphicsElementSVGImageElementSVGLinearGradientElementSVGLineElementSVGMarkerElement實驗性的SVGMaskElementSVGMetadataElementSVGMPathElementSVGPathElementSVGPatternElementSVGPolylineElementSVGPolygonElementSVGRadialGradientElementSVGRectElementSVGScriptElementSVGSetElementSVGStopElementSVGStyleElementSVGSVGElementSVGSwitchElementSVGSymbolElementSVGTextContentElementSVGTextElementSVGTextPathElementSVGTextPositioningElementSVGTitleElementSVGTSpanElementSVGUseElementSVGViewElement
SVG 資料型別介面
以下是用於 SVG 屬性和特性定義中的資料型別的 DOM API。
靜態型別
SVGAngleSVGLengthSVGLengthListSVGNumberSVGNumberListSVGPreserveAspectRatioSVGStringListSVGTransformSVGTransformList
動畫型別
與 SMIL 相關的介面
其他 SVG 介面
規範
| 規範 |
|---|
| Scalable Vector Graphics (SVG) 2 |