SVG) 1.0 Specification W3C Candidate Recommendation 02 November 2000
Total Page:16
File Type:pdf, Size:1020Kb
next contents properties index Scalable Vector Graphics (SVG) 1.0 Specification W3C Candidate Recommendation 02 November 2000 This version: http://www.w3.org/TR/2000/CR-SVG-20001102/ (Available as: PDF, zip archive of HTML) Latest version: http://www.w3.org/TR/SVG/ Previous version: http://www.w3.org/TR/2000/CR-SVG-20000802/ Editor: Jon Ferraiolo <[email protected]> Authors: See author list Copyright ©1998, 1999, 2000 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Abstract This specification defines the features and syntax for Scalable Vector Graphics (SVG), a language for describing two-dimensional vector and mixed vector/raster graphics in XML. Status of this document The Scalable Vector Graphics (SVG) 1.0 specification is still in the Candidate Recommendation phase. This new draft specification is being published to reflect minor changes to the specification and editorial updates resulting from implementation feedback. The SVG Working Group (Members-only) considers the specification to be stable and encourages implementation and comment on the specification during this period. The Candidate Recommendation review period ends when there exists at least one SVG implementation which passes each of the Basic Effectivity (BE) tests in the SVG test suite. The implementation status of SVG is already very good, and at this point, most of the test are passed by one or multiple implementations, but as yet the exit criteria have not been met. It is anticipated that implementation status will be such that the exit criteria will be met in approximately one month. Please send review comments before the review period ends to [email protected]. Should this specification prove very difficult or impossible to implement, the Working Group will return the document to Working Draft status and make necessary changes. Otherwise, the Working Group anticipates asking the W3C Director to advance this document to Proposed Recommendation. This is a W3C Working Draft for review by W3C Members and other interested parties. It is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by, or the consensus of, the W3C Membership. This document has been produced as part of the Graphics Activity. The authors of this document are the SVG WG members. The editor is Jon Ferraiolo. A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/. Table of Contents ● Expanded Table of Contents ● Copyright notice ● 1 Introduction ● 2 Concepts ● 3 Rendering Model ● 4 Basic Data Types and Interfaces ● 5 Document Structure ● 6 Styling ● 7 Coordinate Systems, Transformations and Units ● 8 Paths ● 9 Basic Shapes ● 10 Text ● 11 Painting: Filling, Stroking and Marker Symbols ● 12 Color ● 13 Gradients and Patterns ● 14 Clipping, Masking and Compositing ● 15 Filter Effects ● 16 Interactivity ● 17 Linking ● 18 Scripting ● 19 Animation ● 20 Fonts ● 21 Metadata ● 22 Backwards Compatibility ● 23 Extensibility ● Appendix A: DTD ● Appendix B: SVG's Document Object Model (DOM) ● Appendix C: IDL Definitions ● Appendix D: Java Language Binding ● Appendix E: ECMAScript Language Binding ● Appendix F: Implementation Requirements ● Appendix G: Conformance Criteria ● Appendix H: Accessibility Support ● Appendix I: Internationalization Support ● Appendix J: Minimizing SVG File Sizes ● Appendix K: References ● Appendix L: Property index ● Appendix M: Change History The following sections have not been written yet, but are expected to be be present in later versions of this specification: ● Appendix N: Element and attribute index ● Appendix O: Index Authors: John Bowler, Microsoft Corporation <[email protected]> Milt Capsimalis, Autodesk Inc. <[email protected]> Richard Cohn, Adobe Systems Incorporated <[email protected]> David Dodds, Lexica <[email protected]> Andrew Donoho, IBM <[email protected]> David Duce, Oxford Brookes University <[email protected]> Jerry Evans, Sun Microsystems <[email protected]> Jon Ferraiolo, Adobe Systems Incorporated <[email protected]> Scott Furman, Netscape Communications Corporation <[email protected]> Brent Getlin, Macromedia <[email protected]> Peter Graffagnino, Apple <[email protected]> Rick Graham, BitFlash Inc. <[email protected]> Vincent Hardy, Sun Microsystems, <[email protected]> Lofton Henderson, OASIS, <[email protected]> Alan Hester, Xerox Corporation <[email protected]> Bob Hopgood, RAL (CCLRC) <[email protected]> Dean Jackson, CSIRO <[email protected]> Christophe Jolif, ILOG <[email protected]> Kelvin Lawrence, IBM <[email protected]> Chris Lilley, W3C <[email protected]> Philip Mansfield, IntraNet Solutions, Inc. <[email protected]> Kevin McCluskey, Netscape Communications Corporation <[email protected]> Tuan Nguyen, Microsoft Corporation <[email protected]> Troy Sandal, Visio Corporation <[email protected]> Peter Santangeli, Macromedia <[email protected]> Haroon Sheikh, Corel Corporation <[email protected]> Gavriel State, Corel Corporation <[email protected]> Robert Stevahn, Hewlett-Packard Company <[email protected]> Timothy Thompson, Kodak <[email protected]> Shenxue Zhou, Quark <[email protected]> next contents properties index previous next contents properties index Expanded Table of Contents ● Expanded Table of Contents ● Copyright notice ❍ W3C Document Copyright Notice and License ❍ W3C Software Copyright Notice and License ● 1 Introduction ❍ 1.1 About SVG ❍ 1.2 SVG MIME type, file name extension and Macintosh filetype ❍ 1.3 Compatibility with Other Standards Efforts ❍ 1.4 Terminology ❍ 1.5 Definitions ● 2 Concepts ● 3 Rendering Model ❍ 3.1 Introduction ❍ 3.2 The painters model ❍ 3.3 Rendering Order ❍ 3.4 Grouping ❍ 3.5 Types of graphics elements ■ 3.5.1 Painting shapes and text ■ 3.5.2 Painting raster images ❍ 3.6 Filtering painted regions ❍ 3.7 Clipping, masking and object opacity ❍ 3.8 Parent Compositing ● 4 Basic Data Types and Interfaces ❍ 4.1 Basic data types ❍ 4.2 Recognized color keyword names ❍ 4.3 Basic DOM interfaces ● 5 Document Structure ❍ 5.1 Defining an SVG document fragment: the 'svg' element ■ 5.1.1 Overview ■ 5.1.2 The 'svg' element ❍ 5.2 Grouping and Naming Collections of Drawing Elements: the 'g' element ■ 5.2.1 Overview ■ 5.2.2 The 'g' element ❍ 5.3 References and the 'defs' element ■ 5.3.1 Overview ■ 5.3.2 URI reference attributes ■ 5.3.3 The 'defs' element ❍ 5.4 The 'desc' and 'title' elements ❍ 5.5 The 'symbol' element ❍ 5.6 The 'use' element ❍ 5.7 The 'image' element ❍ 5.8 Conditional processing ■ 5.8.1 Conditional processing overview ■ 5.8.2 The 'switch' element ■ 5.8.3 The requiredFeatures attribute ■ 5.8.4 The requiredExtensions attribute ■ 5.8.5 The systemLanguage attribute ❍ 5.9 Specifying whether external resources are required for proper rendering ❍ 5.10 Common attributes ■ 5.10.1 The id attribute ■ 5.10.2 The xml:lang and xml:space attributes ❍ 5.11 DOM interfaces ● 6 Styling ❍ 6.1 SVG's styling properties ❍ 6.2 Usage scenarios for styling ❍ 6.3 Alternative ways to specify styling properties ❍ 6.4 Specifying properties using the presentation attributes ❍ 6.5 Entity definitions for the presentation attributes ❍ 6.6 Styling with XSL ❍ 6.7 Styling with CSS ❍ 6.8 Facilities from CSS and XSL used by SVG ❍ 6.9 Referencing external style sheets ❍ 6.10 The 'style' element ❍ 6.11 The class attribute ❍ 6.12 The style attribute ❍ 6.13 Specifying the default style sheet language ❍ 6.14 Property inheritance ❍ 6.15 The scope/range of styles ❍ 6.16 User agent style sheet ❍ 6.17 Aural style sheets ❍ 6.18 DOM interfaces ● 7 Coordinate Systems, Transformations and Units ❍ 7.1 Introduction ❍ 7.2 The initial viewport ❍ 7.3 The initial coordinate system ❍ 7.4 Coordinate system transformations ❍ 7.5 Nested transformations ❍ 7.6 The transform attribute ❍ 7.7 The viewBox attribute ❍ 7.8 The preserveAspectRatio attribute ❍ 7.9 Establishing a new viewport ❍ 7.10 Units ❍ 7.11 Object bounding box units ❍ 7.12 DOM interfaces ● 8 Paths ❍ 8.1 Introduction ❍ 8.2 The 'path' element ❍ 8.3 Path Data ■ 8.3.1 General information about path data ■ 8.3.2 The "moveto" commands ■ 8.3.3 The "closepath" command ■ 8.3.4 The "lineto" commands ■ 8.3.5 The curve commands ■ 8.3.6 The cubic Bézier curve commands ■ 8.3.7 The quadratic Bézier curve commands ■ 8.3.8 The elliptical arc curve commands ■ 8.3.9 The grammar for path data ❍ 8.4 Distance along a path ❍ 8.5 DOM interfaces ● 9 Basic Shapes ❍ 9.1 Introduction ❍ 9.2 The 'rect' element ❍ 9.3 The 'circle' element ❍ 9.4 The 'ellipse' element ❍ 9.5 The 'line' element ❍ 9.6 The 'polyline' element ❍ 9.7 The 'polygon' element ❍ 9.8 The grammar for points specifications in 'polyline' and 'polygon' elements ❍ 9.9 DOM interfaces ● 10 Text ❍ 10.1 Introduction ❍ 10.2 Characters and their corresponding glyphs ❍ 10.3 Fonts, font tables and baselines ❍ 10.4 The 'text' element ❍ 10.5 The 'tspan' element ❍ 10.6 The 'tref' element ❍ 10.7 Text layout ■ 10.7.1 Text layout introduction ■ 10.7.2 Setting the inline progression direction ■ 10.7.3 Glyph orientation within a text run ■ 10.7.4 Relationship with bidirectionality ❍ 10.8 Text rendering order ❍ 10.9 Alignment properties ■ 10.9.1 Text alignment properties ■ 10.9.2 Baseline alignment properties ❍ 10.10 Font selection properties ❍ 10.11 Spacing properties ❍ 10.12 Text decoration ❍ 10.13