\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(4,4){C}
\tkzDefPoint(0,4){D}
\tkzLabelPoints[left](A,D)
\tkzLabelPoints[right](B,C)
\tkzDrawSegment[](A,B)
\tkzDrawSegment[](B,C)
\tkzDrawSegment[](C,D)
\tkzDrawSegment[](A,D)
\tkzLabelSegment[below left=5pt, xshift=7mm](A,B){}
\tkzLabelSegment[ left=5pt, xshift=13mm](B,C){}
\tkzLabelSegment[above left=5pt, xshift=7mm](C,D){}
\tkzLabelSegment[ left=5pt, xshift=0mm](A,D){}
\tkzMarkRightAngle(A,B,C)
\tkzMarkRightAngle(B,C,D)
\tkzMarkRightAngle(C,D,A)
\tkzMarkRightAngle(D,A,B)
\end{tikzpicture}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(5,0){B}
\tkzDefPoint(7,4){C}
\tkzDefPoint(2,4){D}
\tkzLabelPoints[left](A,D)
\tkzLabelPoints[right](B,C)
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\tkzDrawSegment(D,A)
\tkzDrawSegment(B,C)
\end{tikzpicture}
\end{document}
在第一张图片中,我画了一个正方形,它清晰完美,但当我尝试画四边形时,BC 和 AD 这两条边就不清晰了,我的意思是看起来很暗。那么问题是什么?我猜可能是长度问题,但找不到解决方案。
答案1
您可以简化您的代码 cfr 当然是正确的,也许是查看器存在问题,因为在 tkz 中绘制使用了 tikz 命令。
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,4/4/C,0/4/D}
%\tkzDrawSegments(A,B B,C C,D A,D)
\tkzDrawPolygon(A,B,C,D)
\tkzLabelPoints[left](A,D)
\tkzLabelPoints[right](B,C)
\tkzMarkRightAngles(A,B,C B,C,D C,D,A D,A,B)
\tkzLabelSegment[below left=5pt, xshift=7mm](A,B){$a$}
\tkzLabelSegment[ left=5pt, xshift=13mm](B,C){$b$}
\tkzLabelSegment[above left=5pt, xshift=7mm](C,D){$c$}
\tkzLabelSegment[ left=5pt](A,D){$d$}
\end{tikzpicture}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,5/0/B,7/4/C,2/4/D}
\tkzDrawPolygon(A,B,C,D)
\tkzLabelPoints[left](A,D)
\tkzLabelPoints[right](B,C)
\end{tikzpicture}
\end{document}