Here's a problem I can't solve. As you can see in the figure below, the clip is bounded by the sector, but the bounding box is modified. I can get around this problem easily, but I'd like to find out what's causing it.
Here are some possible workarounds:
1) \tkzClipBB
\tkzClipSector(O,A)(C)
\tkzDrawLines[ultra thick](O,B A,C)
2) \tkzClipSector(O,A)(C)
\tkzClipCircle(O,A)
\tkzDrawLines[ultra thick](O,B A,C)
3) \pgfinterruptboundingbox
\tkzClipSector(O,A)(C)
\tkzDrawLines[ultra thick](O,B A,C)
\endpgfinterruptboundingbox
\documentclass{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/O,2/0/A,0/6/B,-2/0/C}
\tkzDrawPoints(O,A,C)
\tkzDrawCircle(O,A)
\tkzClipSector(O,A)(C)
\tkzDrawLines[ultra thick](O,B A,C)
\end{tikzpicture}
\end{document}
Note that if, instead of drawing a straight line, I fill in a disk, the problem is identical:
\fbox{\begin{tikzpicture}
\tkzDefPoints{0/0/O,2/0/A,0/6/B,-2/0/C}
\tkzDrawPoints(O,A,C)
\tkzDrawCircle(O,A)
\tkzClipSector(O,A)(B)
\tkzFillCircle[red](O,B)
\end{tikzpicture}}
Last remark: no problem if I clip a circle.
\fbox{\begin{tikzpicture}
\tkzDefPoints{0/0/O,2/0/A,0/6/B,-2/0/C}
\tkzDrawPoints(O,A,C)
\tkzDrawCircle(O,A)
\tkzClipCircle(O,A)
\tkzDrawLines[ultra thick](O,B A,C)
\end{tikzpicture}}
You can find the macros for sector layouts here : tkz-obj-eu-sectors.tex. I tried to find out from these macros when the bounding box could be modified, but without success!
Do you have an explanation for this problem?
begingroup
andendgroup
line 230-249 and 272-277, this may solve the problem?