PGF/TikZ Manual

# The TikZ and PGF Packages Manual for version 3.1.10

## Libraries

#### 41Angle Library

• TikZ Library angles

• \usetikzlibrary{angles} % and plain
\usetikzlibrary[angles] % Cont

This library defines pic types for drawing angles.

• Pic type angle=A--B--C

• This pic adds a drawing of an angle to the current path. This “drawing of an angle” consist of a “sector” or “wedge” or “slice” whose pointed end is at point B and whose straight sides lie on the lines form B to A and from B to C. The length of these lines is governed by the following key:

• /tikz/angle radius=dimension (no default, initially 5mm)

• The length of the sides of the angle’s wedge:

The three points A, B, and C must be the names of nodes or coordinates; you cannot use direct coordinates like “(1,1)” here.

You can leave out the three points, in this case the text A--B--C is used; so in the above examples we could just have written {angle} in the first pic.

Concerning the sector that makes up the drawing of the angle, the angular part of this sector is drawn in front of the path if the draw option is given to the pic, while filled sector is drawn behind the pic, provided an option like fill or shade is passed to the pic. The following example shows the difference:

When pic text is set (which you typically do by using the quotes syntax), a node will be created whose name is empty (and, thus, inherits the pic’s name) and which will be at the half-way angle between the lines to A and C and whose distance from B is angle radius times the following factor:

• /tikz/angle eccentricity=factor (no default, initially 0.6)

• Pic type right angle=A--B--C

• This pic adds a drawing of a right angle to the current path. It works in the same way as angle pic.