Copyright © 2003 W3C ® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This document lists the design principles and requirements for the creation of an SVG specification related to Advanced Gradients.
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 made obsolete 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". A list of current W3C Recommendations and other technical documents, including Working Drafts and Notes, can be found at http://www.w3.org/TR/.
This is the first release of the SVG Advanced Gradient Requirements. It is expected that this document will progress through a number of working drafts, including "Last Call", before being published in final form.
This document was developed by the Scalable Vector Graphics (SVG) working group as part of the W3C Graphics Activity. The authors of this document are the SVG Working Group members.
Feedback on this document should be sent to the public mailing list of the SVG Working Group
(list archives). To subscribe, send an email to
www-svg-request@w3.org
with the word subscribe
in the subject line.
The latest information regarding patent disclosures related to this document is available on the Web. As of this publication, the SVG Working Group are not aware of any royalty-bearing patents they believe to be essential to SVG.
This section represents the status of this document at the time this version was published. It will become out dated if and when a new version is published. The latest status is maintained at the W3C.
The SVG specification is a W3C recommendation that describes two-dimensional graphics in XML. There are currently two core SVG Recommendations; SVG 1.1 and SVG Tiny 1.2. SVG 1.1 was initially designed as a document format for print and web content publication, and as such supports many common graphical features for print and screen display. Similarly, SVG Tiny 1.2 was designed primarily for display of content for the web on mobile devices, and as such supports a smaller subset of graphical features. Industry, developer and community feedback has suggested a desire to extend some of the features available in SVG, in particular the gradient paint servers available to authors.
Currently the SVG 1.1 specification defines two types of gradient paint servers; Linear and Radial. Both gradient types allow a content author to define colour stops along a single gradient vector which produces a blend fill that may be used to paint graphical objects and text. Such gradients whilst being able to produce vibrant colours, are limited to a straight line and are thus unable to produce complex gradient effects. There exists a need to define a gradient fill that allows designers to produce more complex life-like blends.
In response, the SVG Working Group has begun an investigation to develop a module to extend the gradient fill capabilities currently available in SVG. The current feeling within the SVG Working Group is that the advanced gradients will be a set of content requirements and conformance criteria that allow new gradient types to be defined to fill an object. It is very likely that there will be a set of new language features proposed which are required for the module. It is expected then, that some of these new features will be become part of the core SVG language and other modules that are built from SVG.
The following key words and phrases used throughout this document are defined here for clarity. The terms Must, Should, and May are used to specify the extent to which an item is a requirement for the SVG working group in defining SVG. These recommendations should not be mistaken as a guide to implementers.
Advanced gradients specify colour variation in an image which blends smoothly to colours defined either along a curved path or at points distributed over two dimensions. The following usage scenarios illustrate some of the ways in which SVG Advanced Gradients might be used for various applications.
Pseudo 3D Advanced gradients could be used to produce advanced lighting effects that follow odd shaped surfaces produce pseudo 3D effects.
Naturalistic Images Advanced gradients could be used to produce a compact representation of realistic images such as skin tone.
Artistic Effects Advanced gradients could be used to produce fills that follow curved contours.
Compact representation A key reason for using advanced gradient technologies is to produce an increased range of gradient effects, where the file size of an image containing those gradient effects is much smaller than the file size of a similar bitmap image.
Memory and processor requirements Due to the complex effects that advanced gradients can produce, the feature may require significant memory and processing resources.
Implementation commitments Advanced gradients will provide the ability for the author to produce colour rich complex gradient fills. To support advanced gradients, implementations may need to add new algorithms to produce the correct gradient results. It is expected that specific details of the rendering algorithm will need to be defined; this may include the necessary steps an implementation will need to perform to implement the algorithm. Advanced gradients must be consistent with SVG's rendering and animation model to allow ease of integration with existing SVG implementations.
Ease of authoring To ensure consistency with SVG, advanced gradients should consider adopting existing SVG gradient features where applicable and extending the existing SVG gradient syntax where applicable. Additionally, the syntax structure of advanced gradients should be defined such that the content can be read and hand-authored with relative ease.
The Gradient Mesh tool in Adobe Illustrator allows an author to create gradients inside any shape. Gradient Meshes are maintained in the document and saved in a vector form allowing them to remain scalable and editable throughout the design process. The tool allows an author to lay patches on an object using a grid (mesh). When a mesh is applied to an object, the object is converted to a mesh object. Illustrator allows mesh lines to be added and removed. When a new mesh point is added to an already existing mesh line, a perpendicular line is added which joins the perimeters of the object and crosses the existing mesh line. When a new mesh point is added to an object patch, both vertical and horizontal mesh lines that join the perimeters of the object are created. Where mesh lines cross with other mesh lines or object perimeters, new mesh points are created. When new mesh lines are created new patches are formed as well.
The Mesh Fill in CorelDraw is very similar to the Gradient Mesh tool in Adobe Illustrator. The Mesh Fill allows an author to apply patches to objects or a single path. Similar to Adobe Illustrator, the Mesh Fill feature allows an author to define patches using a grid. Placing a grid on an object converts the object to a mesh fill object. CorelDraw allows vertical or horizontal grid lines to be added or removed. Nodes are placed where grid lines join or intersect.
The authors of this specification are the participants of the W3C SVG Working Group.