Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/generic/pgf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed

- Fix formatting of `default XXX, initially XXX` in key docs #1278
- Moved `base west`, `base east`, `mid west`, and `mid east` anchors
onto the edge of the shape for `circle` and `ellipse` shapes

## [3.1.11] - 2025-08-14 Henri Menke

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,26 @@
\anchor{mid west}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgfmathsetlength\pgf@y{0.5ex}%
\pgfmathsetlength\pgf@x{\pgf@xc
- \pgf@xa*cos(asin((\pgf@y-\pgf@yc)/\pgf@ya))}
}%
\anchor{base west}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgf@y=0pt
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgf@y=0pt%
\pgfmathsetlength\pgf@x{\pgf@xc
- \pgf@xa*cos(asin((\pgf@y-\pgf@yc)/\pgf@ya))}
}%
\anchor{north west}
{
Expand Down Expand Up @@ -132,18 +140,26 @@
\anchor{mid east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgfmathsetlength\pgf@y{0.5ex}%
\pgfmathsetlength\pgf@x{\pgf@xc
+ \pgf@xa*cos(asin((\pgf@y-\pgf@yc)/\pgf@ya))}
}%
\anchor{base east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgf@y=0pt
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgf@y=0pt%
\pgfmathsetlength\pgf@x{\pgf@xc
+ \pgf@xa*cos(asin(-(\pgf@y-\pgf@yc)/\pgf@ya))}
}%
\anchor{north east}
{
Expand Down
32 changes: 28 additions & 4 deletions tex/generic/pgf/modules/pgfmoduleshapes.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1267,10 +1267,34 @@
\anchor{south}{\centerpoint\advance\pgf@y by-\radius}%
\anchor{west}{\centerpoint\advance\pgf@x by-\radius}%
\anchor{east}{\centerpoint\advance\pgf@x by\radius}%
\anchor{mid west}{\centerpoint\advance\pgf@x by-\radius\pgfmathsetlength\pgf@y{.5ex}}%
\anchor{mid east}{\centerpoint\advance\pgf@x by\radius\pgfmathsetlength\pgf@y{.5ex}}%
\anchor{base west}{\centerpoint\advance\pgf@x by-\radius\pgf@y=0pt}%
\anchor{base east}{\centerpoint\advance\pgf@x by\radius\pgf@y=0pt}%
\anchor{mid west}{\centerpoint
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgfmathsetlength\pgf@y{0.5ex}%
\pgfmathsetlength\pgf@x{\pgf@xc
- \radius*cos(asin((\pgf@y-\pgf@yc)/\radius))}%
}%
\anchor{mid east}{\centerpoint
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgfmathsetlength\pgf@y{0.5ex}%
\pgfmathsetlength\pgf@x{\pgf@xc
+ \radius*cos(asin((\pgf@y-\pgf@yc)/\radius))}%
}%
\anchor{base west}{%
\centerpoint
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgf@y=0pt%
\pgfmathsetlength\pgf@x{\pgf@xc - \radius*cos(asin(-\pgf@yc/\radius))}%
}%
\anchor{base east}{%
\centerpoint
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgf@y=0pt%
\pgfmathsetlength\pgf@x{\pgf@xc + \radius*cos(asin(-\pgf@yc/\radius))}%
}%
\anchor{north west}{
\centerpoint
\pgf@xa=\radius
Expand Down
Loading