graphics state

A graphics state is the bundle of settings that is in force while a shape is being drawn.

In more detail

Drawing is not only where the marks go. How see-through they are, how they mix with what is already underneath, how thick the pen is and how its ends are cut: all of that is settled before the mark is laid. That bundle of decisions is the state.

Bundling them under one name saves repeating them. Ten shapes drawn half see-through name the same state ten times, and the file holds the settings once.

What it does on a real document

A request declares a state under a name and a shape applies it by that name. It lasts exactly as long as the shape that named it: what comes next is drawn as though nothing had been asked for.

Only what the state names is written. A state asking for one setting and nothing else leaves everything else exactly where it stood.

Where it comes from, and why

The idea comes from the page description languages printers were driven by: a printer had very little memory, so the settings were kept in one place and the marks referred to them.

It stayed, because a file where the settings are written once is both smaller and easier to change afterwards.

Glossary

request
One call to the service: you send what the document should say, and get the document back. Your bill counts these calls, one for each document. The number of pages inside a document is never counted.

Every word the site explains

Back to the whole glossary