7

Filling, Clipping, and Shading

Now, we enter the book’s second part and start with advanced drawing techniques.

The first chapters explained drawing paths, geometric objects, and path elements such as nodes and edges. This chapter will focus on areas enclosed by a path for filling and clipping.

Specifically, we will deal with the following:

  • Filling an area
  • Understanding a path interior
  • Clipping a drawing
  • Reverse clipping
  • Shading an area

At the end of the chapter, you will be proficient in coloring and clipping and know two different ways to define areas with self-intersecting paths and unconnected path segments.

Technical requirements

You can work with the code at https://tikz.org/chapter-07 or use Overleaf apart from your local LaTeX setup ...

Get LaTeX Graphics with TikZ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.