Skip to content

Commit

Permalink
Rewrite explanation for \anchorborder
Browse files Browse the repository at this point in the history
  • Loading branch information
projekter authored Dec 16, 2019
1 parent ba8628c commit 0b09528
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions doc/generic/pgf/text-en/pgfmanual-en-base-nodes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1100,11 +1100,21 @@ \subsubsection{Command for Declaring New Shapes}
|\pgfpointshapeborder| command, the \meta{code} will be executed to
discern this point. When the execution of the \meta{code} starts, the
dimensions |\pgf@x| and |\pgf@y| will have been set to a location $p$
in the shape's coordinate system. It is now the job of the \meta{code}
to set up |\pgf@x| and |\pgf@y| such that they specify the point on the
shape's border that lies on a straight line from the shape's center to
the point $p$. Usually, this is a somewhat complicated computation,
involving many case distinctions and some basic math.
in the shape's coordinate system, and relative to the anchor |center|.
Note that |\pgfpointshapeborder| will produce an error if the shape does
not contain the |center| anchor.

It is now the job of the \meta{code} to set up |\pgf@x| and |\pgf@y|
such that they specify the point on the shape's border that lies on a
straight line from the shape's center to the point $p$. Usually, this is
a somewhat complicated computation, involving many case distinctions and
some basic math. Note that the output coordinates must be returned in the
shape's coordinate system, \emph{no longer} relative to the |center|
anchor. While these different points of reference are only noticeable if
the |center| anchor is not at the origin of the shape's coordinate system,
it implies that ``doing nothing'' as a border anchor, i.e., returning the
point that was fed to |\pgfpointshapeborder| requires adding the |center|
anchor to the input coordinates.

For our |simple rectangle| we must compute a point on the border of a
rectangle whose one corner is the origin (ignoring the depth for
Expand Down

0 comments on commit 0b09528

Please sign in to comment.