Raphaël supports three fundamental types of graphics elements: shapes, images, and text. Shapes can be predefined shapes such as a rectangle, circle, or ellipse or they can be a combination of lines, curves, and paths. Vector graphics are by their very definition the sum of such shapes, and throughout the next two chapters we will create a number of interesting drawings based on them. Images are either bitmap images (such as
.jpeg) or existing SVG images, and can be manipulated by Raphaël in many of the ways that shapes can be.
Shapes and text can be painted, that is, filled and stroked (given an outline). Fills can be either a single color or a linear or radial gradient. Strokes can only be filled ...