3

This question already has an answer here:

The syntax to produce a Bézier curve in pgf is

\pgfpathcurveto{first control point}{second control point}{target}

This defines the curvature by control points. Considering the degrees of freedom the curve definition provides, it should also be possible to define the shape by stating two points on the curve.

TikZ provides this with the smooth parameter as shown in another answer. But within \pgfdeclareshape, TikZ luxury is not available. While declaring a shape to cleanly surround the text box, a pure pgf solution is needed. This would greatly simplify it to surround the text box by a curve.

the right corner points are way off

The full code example can be found in a gist. In the result, the text box is marked in gray. The surrounding shape should exactly pass through the corner points of these gray rectangles.

So, is there some command like this?

\pgfpathcurvethrough{first relay point}{second relay point}{target}

marked as duplicate by percusse tikz-pgf Jun 2 '15 at 17:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You can use \pgfplothandlercurveto (= smooth) in PGF, too. However, it would be easier (especially for a closed curve) to use a simple calculated path (say an arc that explicitly passes through those points). – Qrrbrbirlbel Dec 18 '13 at 2:18