One drawing, and each reader sees their own

The same floor plan has to reach three people: the site, with its dimensions; the client, without the internal notes; the printer, without the draft watermark across it. Making three files means three files to keep in step, and the day one of them is remade and the others are not, somebody builds from the wrong drawing.

The file carries six layers, each with a name of its own. Desktop reading software such as Adobe Acrobat Reader shows that list in a panel down the side and lets you show and hide them one at a time; the reading software built into a browser shows no list and draws the lot. The draft watermark states a wish of its own besides — on the screen yes, on the paper no — which is again something the printing software is asked, not made, to honour. Open the document in desktop reading software: the panel is where this one is worth looking at.

What this example shows

  • Six named layers desktop reading software lists, shows and hides.
  • Notes that arrive hidden, and a draft watermark asked to stay off the paper.
  • The walls, which belong to the plan itself and are drawn whichever layers are hidden.

The source code, complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The document itself

Open the document in English Open the document in French

Examples near this one

Cutting out what you draw

The same area of stripes shown through two windows: a plain disc, and a ring whose middle is left bare.

Transparency and blend modes

Half-transparent fills that overlap and mix, one orange square laid over a blue bar in four different ways of mixing colours, and a line of overlapping letters painted two ways.

Gradients in a line, in a circle, and read from a function

Five panels: a header that fades out, the same fade on the diagonal, a glow carried past its own circle so the corners fill, a blend that goes by way of a third colour, and a checkerboard whose colour is worked out from where each point stands, redder to the right and greener towards the top.

Four kinds of mesh, every corner its own colour

Six triangles round a centre they share, their edges stroked over the paint; a lattice of points in the four printing inks; a patch whose four sides are curves; and the same patch pulled about by four points inside it.

Every example, by subject