Skip to content

Using |- and cycle together can cause bad corners #1428

@hammondkd

Description

@hammondkd

Brief outline of the bug

As initially reported on TeX Stack Exchange (https://tex.stackexchange.com/questions/754905), using a combination of scale, cycle, and right-angle corners can result in improperly closed corners.

Minimal working example (MWE)

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=0.9]
  \draw[draw=red, fill=red, fill opacity=0.3, thick]
    (0.25, 5.8) -| (0.45, 6.2) -| cycle;
\end{tikzpicture}
\end{document}

Note that adding anything else (e.g., a point that does not draw anything) after the \draw command causes the corner to look like it's supposed to look.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions