Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local bounding box after clip does not place node #795

Closed
hmenke opened this issue Dec 1, 2019 · 1 comment
Closed

local bounding box after clip does not place node #795

hmenke opened this issue Dec 1, 2019 · 1 comment
Milestone

Comments

@hmenke
Copy link
Member

hmenke commented Dec 1, 2019

Brief outline of the bug

When a pic is placed and a node assigned so that its local bounding box can be referenced and it is preceded by a \clip, the node is created but never placed. That implies that all operations relative to this node are also never placed.

Minimal working example (MWE)

\documentclass{article}
\usepackage{tikz}
\tikzset{
  pics/microph/.style={code={ 
      \draw[black, line width=.2em, rounded corners=1.7ex] 
      (-.85em,4.5ex) -- (-.85em,2ex) -- (.85em,2ex) -- (.85em,4.5ex);
    }},
}
\begin{document}
\begin{tikzpicture}
  \begin{scope}
    \clip (-8.5,-6.5) rectangle (8.5,6.5);
    \node[fill=cyan, draw=cyan, minimum width=17cm, minimum height=13cm](sky){};
    \pic[rotate=40, local bounding box=microfono] at (4.5,-5) {microph};
    \draw[black, line width=2pt] (microfono.-45) -- ++(-.2,+.2) ++(.2,-.2) -- ++(0,-2);
  \end{scope}
\end{tikzpicture}
\end{document}
hmenke added a commit to hmenke/pgf that referenced this issue Dec 1, 2019
@hmenke hmenke closed this as completed Dec 1, 2019
@hmenke hmenke added this to the 3.1.5 milestone Dec 13, 2019
hmenke added a commit that referenced this issue May 23, 2020
@hmenke
Copy link
Member Author

hmenke commented May 23, 2020

The fix broke all other uses of local bounding box. People will have to live with the workaround of setting overlay=false when using local bounding box in a \clip context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant