Ellipse Ellipses are created using the paper’s Paper.ellipse() method. Elements have parents and children and attributes that define them. While Raphaël Js is well documented on its reference, this document is a guide to drawing web pages with Raphaël Js for those users new to vector graphics, starting with easy examples through the advanced Raphaël features like animations, event handling and Raphaël extensions development. Это определение сообщает, что SVG является файлом XML, так что вы сможете открыть его в текстовом редакторе. Я нашел в Интернете свободный SVG-файл с картой Европы, который и собираюсь использовать в этом уроке.
Gradients You can use the fill attribute to set a color gradient for filling. A rich number of gradients types are supported which are descripbed in Raphael types — Gradients. They’re just text files with a bunch of XML inside. They can be altered manually in a text editor. Also, as in CSS font-family you can set several font names as a «fallback» system like font-family=arial,sans-serif. If you really need to show some text with a custom font use print() instead. Nevertheless, shapes created with print() are paths, not text. So they do not support text related attributes like those. In general, you will want to use print() for titles and small texts that need to be pretty formated. Let’s say that is convenient to define a new attribute for setting a shape color’s «hue» component, as in hsv(hue, saturation, brightness) (). But what about if we are interesting on representing another kind of attribute that affects the fill color.