Skip to content

Scope

Scope

Bases: TikzEnvironment

A class to create a scope environment.

The Scope class is meant to handle the scope environment in TikZ. Scoping is useful as it can be used to nest a set of commands in a TikZ picture, or it can be used in conjunction with the TikZ clip command to "clip out" drawings.

This class is analagous to the TikZ command

\begin{scope}
    ...
\end{scope}

code property

code: str

A string contaning the drawing_objects in the scope.

append

append(*args: List[DrawingObject]) -> None

Append a drawing object to the scope statement

clip

clip(draw_obj: DrawingObject, draw: bool = False) -> None

Clip a drawing object in the scope environment

Clip

A class for a clipping code statement.

This class is used to clip a single drawing object draw_obj. It is meant to be used in conjunction with the Scope class. It is analagous to the tikz code

\clip ... # some drawing object