I added an experimental library bbox which computes the bounding box for curves. I tested it and it seems to work unless the curve has very steep angles, in which case there might be dimension too large
errors. However, in this example and all ``reasonable'' cases it seems to work.
\documentclass[letterpaper]{article}
\usepackage[top=2cm,bottom=2cm,left=2cm,right=2cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{bbox}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[y=0.80pt, x=0.8pt,yscale=-1]
\path[draw=black,fill=white]
(258.9527,290.5199) .. controls (173.9885,538.4766) and (568.5860,261.2969) ..
(306.5098,257.1141) .. controls (44.4337,252.9312) and (429.9845,542.5624) ..
(352.9767,292.0206) .. controls (275.9689,41.4788) and (119.6549,497.6604) ..
(334.1376,346.9999) .. controls (548.6203,196.3394) and (66.4622,188.6439) ..
(276.0276,346.0724) .. controls (485.5930,503.5010) and (343.9169,42.5633) ..
(258.9527,290.5199) -- cycle;
\draw (current bounding box.south west) rectangle (current bounding box.north
east);
\end{tikzpicture}
\caption{Default.}
\end{figure}
\begin{figure}
\centering
\begin{tikzpicture}[y=0.80pt, x=0.8pt,yscale=-1,bezier bounding box]
\path[draw=black,fill=white]
(258.9527,290.5199) .. controls (173.9885,538.4766) and (568.5860,261.2969) ..
(306.5098,257.1141) .. controls (44.4337,252.9312) and (429.9845,542.5624) ..
(352.9767,292.0206) .. controls (275.9689,41.4788) and (119.6549,497.6604) ..
(334.1376,346.9999) .. controls (548.6203,196.3394) and (66.4622,188.6439) ..
(276.0276,346.0724) .. controls (485.5930,503.5010) and (343.9169,42.5633) ..
(258.9527,290.5199) -- cycle;
\draw (current bounding box.south west) rectangle (current bounding box.north
east);
\end{tikzpicture}
\caption{With \texttt{bezier bounding box} from the \texttt{bbox} library
switched on.}
\end{figure}
\end{document}

The theory behind this is very simple. The TeX code for the following can be found under this link.

For those who do not want to follow external links: this is the code of the library:
\tikzset{%
bezier bounding box/.is choice,%
bezier bounding box/.default=true,%
bezier bounding box/true/.code=\tikzset{switch on bezier bounding box},%
bezier bounding box/false/.code=\tikzset{switch off bezier bounding box}}%
\tikzset{switch off bezier bounding box/.code={%
\def\pgf@lt@curveto##1##2##3##4##5##6{%
\pgf@protocolsizes{##1}{##2}%
\pgf@protocolsizes{##3}{##4}%
\pgf@protocolsizes{##5}{##6}%
\pgfsyssoftpath@curveto{\the##1}{\the##2}{\the##3}{\the##4}{\the##5}{\the##6}%
}%
\let\pgf@nlt@curveto\pgf@lt@curveto}}
%
% it might just be me but according to what I believe to find
% \pgfmathsetlengthmacro appears to generate spaces
%
\tikzset{switch on bezier bounding box/.code={%
\def\pgf@lt@curveto##1##2##3##4##5##6{%
% extrema in x
\pgfmathsetmacro{\pgf@temp@b}{abs(\pgf@path@lastx-##5-3*##1+3*##3)}%
% ^^^ this is used for the denominator below, cannot become too small
\pgfmathsetmacro{\pgf@temp@c}{max(1+\pgf@path@lastx,max(##1,max(##3,##5)))}%
% ^^^ in order to avoid dimension too large errors from squaring lengths in pt
\pgfmathparse{((##1/\pgf@temp@c)*(##1/\pgf@temp@c)-1*((##1/\pgf@temp@c)*(##3/\pgf@temp@c))+(##3/\pgf@temp@c)*(##3/\pgf@temp@c)-1*((##1/\pgf@temp@c)*(##5/\pgf@temp@c))+(-(##3/\pgf@temp@c)+(##5/\pgf@temp@c))*(\pgf@path@lastx/\pgf@temp@c))}%
\pgfutil@tempdima=\pgfmathresult pt\relax%
% ^^^ discriminant
\ifdim\pgf@temp@b pt<0.01pt\relax%
% approximately linear
\pgfmathparse{abs(2*(##1)-2*(##3)+(##5))}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\ifdim\pgfutil@tempdimb<0.1pt\relax%
% if the denominator is very small, it is *likely* large but could be 0/0
\else
\pgfmathsetmacro{\pgf@temp@a}{(2*(##1)-3*(##3)+(##5))/(2*(##1)-2*(##3)+(##5))}%
\pgfmathparse{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\fi%
\else
\ifdim\pgfutil@tempdima<0pt\relax% negative discriminant -> no turning point
\else
\pgfmathsetmacro{\pgf@temp@a}{min(1,max(0,(\pgf@path@lastx-2*##1+##3-\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lastx-##5-3*##1+3*##3)))}%
\pgfmathparse{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\pgfmathsetmacro{\pgf@temp@a}{min(1,max(0,(\pgf@path@lastx-2*##1+##3+\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lastx-##5-3*##1+3*##3)))}%
\pgfmathparse{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\fi%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% extrema in y (completely analogous to the above)
\pgfmathsetmacro{\pgf@temp@b}{abs(\pgf@path@lasty-##6-3*##2+3*##4)}%
\pgfmathsetmacro{\pgf@temp@c}{max(1+\pgf@path@lasty,max(##2,max(##4,##6)))}%
\pgfmathparse{((##2/\pgf@temp@c)*(##2/\pgf@temp@c)-1*((##2/\pgf@temp@c)*(##4/\pgf@temp@c))+(##4/\pgf@temp@c)*(##4/\pgf@temp@c)-1*((##2/\pgf@temp@c)*(##6/\pgf@temp@c))+(-(##4/\pgf@temp@c)+(##6/\pgf@temp@c))*(\pgf@path@lasty/\pgf@temp@c))}%
\pgfutil@tempdima=\pgfmathresult pt\relax%
% ^^^ discriminant
\ifdim\pgf@temp@b pt<0.01pt\relax%
% approximately linear
\pgfmathparse{abs(2*(##2)-2*(##4)+(##6))}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\ifdim\pgfutil@tempdimb<0.1pt\relax%
% if the denominator is very small, it is *likely* large but could be 0/0
\else
\pgfmathsetmacro{\pgf@temp@a}{(2*(##2)-3*(##4)+(##6))/(2*(##2)-2*(##4)+(##6))}%
\pgfmathparse{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\fi%
\else
\ifdim\pgfutil@tempdima<0pt\relax% negative discriminant -> no turning point
\else
\pgfmathsetmacro{\pgf@temp@a}{min(1,max(0,(\pgf@path@lasty-2*##2+##4-\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lasty-##6-3*##2+3*##4)))}%
\pgfmathparse{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\pgfmathsetmacro{\pgf@temp@a}{min(1,max(0,(\pgf@path@lasty-2*##2+##4+\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lasty-##6-3*##2+3*##4)))}%
\pgfmathparse{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\fi%
\fi
\pgf@protocolsizes{\pgf@path@lastx}{\pgf@path@lasty}%
\pgf@protocolsizes{##5}{##6}%
\pgfsyssoftpath@curveto{\the##1}{\the##2}{\the##3}{\the##4}{\the##5}{\the##6}%
}
\let\pgf@nlt@curveto\pgf@lt@curveto}}% fix me: 0/0 cases and occasional
% dimension too large errors (what's the cause?)
If you do not want do load the library, you may just copy the code and sandwich it between \makeatletter
and \makeatother
.
If you encounter dimension too large
errors, you may want to use
\usetikzlibrary{fpu}
\newcommand{\pgfmathsetmacroFPU}[2]{\begingroup%
\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
\pgfmathsetmacro{#1}{#2}%
\pgfmathsmuggle#1\endgroup}
\newcommand{\pgfmathparseFPU}[1]{\begingroup%
\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
\pgfmathparse{#1}%
\pgfmathsmuggle\pgfmathresult\endgroup}
\tikzset{%
bezier bounding box/.is choice,%
bezier bounding box/.default=true,%
bezier bounding box/true/.code=\tikzset{switch on bezier bounding box},%
bezier bounding box/false/.code=\tikzset{switch off bezier bounding box}}%
\tikzset{switch off bezier bounding box/.code={%
\def\pgf@lt@curveto##1##2##3##4##5##6{%
\pgf@protocolsizes{##1}{##2}%
\pgf@protocolsizes{##3}{##4}%
\pgf@protocolsizes{##5}{##6}%
\pgfsyssoftpath@curveto{\the##1}{\the##2}{\the##3}{\the##4}{\the##5}{\the##6}%
}%
\let\pgf@nlt@curveto\pgf@lt@curveto}}
%
% it might just be me but according to what I believe to find
% \pgfmathsetlengthmacro appears to generate spaces
%
\tikzset{switch on bezier bounding box/.code={%
\def\pgf@lt@curveto##1##2##3##4##5##6{%
% extrema in x
\pgfmathsetmacroFPU{\pgf@temp@b}{abs(\pgf@path@lastx-##5-3*##1+3*##3)}%
% ^^^ this is used for the denominator below, cannot become too small
\pgfmathsetmacroFPU{\pgf@temp@c}{max(1+\pgf@path@lastx,max(##1,max(##3,##5)))}%
% ^^^ in order to avoid dimension too large errors from squaring lengths in pt
\pgfmathparseFPU{((##1/\pgf@temp@c)*(##1/\pgf@temp@c)-1*((##1/\pgf@temp@c)*(##3/\pgf@temp@c))+(##3/\pgf@temp@c)*(##3/\pgf@temp@c)-1*((##1/\pgf@temp@c)*(##5/\pgf@temp@c))+(-(##3/\pgf@temp@c)+(##5/\pgf@temp@c))*(\pgf@path@lastx/\pgf@temp@c))}%
\pgfutil@tempdima=\pgfmathresult pt\relax%
% ^^^ discriminant
\ifdim\pgf@temp@b pt<0.01pt\relax%
% approximately linear
\pgfmathparseFPU{abs(2*(##1)-2*(##3)+(##5))}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\ifdim\pgfutil@tempdimb<0.1pt\relax%
% if the denominator is very small, t is *likely* large but could be 0/0
\else
\pgfmathsetmacroFPU{\pgf@temp@a}{(2*(##1)-3*(##3)+(##5))/(2*(##1)-2*(##3)+(##5))}%
\pgfmathparseFPU{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\fi%
\else
\ifdim\pgfutil@tempdima<0pt\relax% negative discriminant -> no turning point
\else
\pgfmathsetmacroFPU{\pgf@temp@a}{min(1,max(0,(\pgf@path@lastx-2*##1+##3-\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lastx-##5-3*##1+3*##3)))}%
\pgfmathparseFPU{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\pgfmathsetmacroFPU{\pgf@temp@a}{min(1,max(0,(\pgf@path@lastx-2*##1+##3+\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lastx-##5-3*##1+3*##3)))}%
\pgfmathparseFPU{\pgf@path@lastx*pow(1-\pgf@temp@a,3)+3*##1*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##3*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##5*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{\pgfutil@tempdimb}{##6}%
\fi%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% extrema in y (completely analogous to the above)
\pgfmathsetmacroFPU{\pgf@temp@b}{abs(\pgf@path@lasty-##6-3*##2+3*##4)}%
\pgfmathsetmacroFPU{\pgf@temp@c}{max(1+\pgf@path@lasty,max(##2,max(##4,##6)))}%
\pgfmathparseFPU{((##2/\pgf@temp@c)*(##2/\pgf@temp@c)-1*((##2/\pgf@temp@c)*(##4/\pgf@temp@c))+(##4/\pgf@temp@c)*(##4/\pgf@temp@c)-1*((##2/\pgf@temp@c)*(##6/\pgf@temp@c))+(-(##4/\pgf@temp@c)+(##6/\pgf@temp@c))*(\pgf@path@lasty/\pgf@temp@c))}%
\pgfutil@tempdima=\pgfmathresult pt\relax%
% ^^^ discriminant
\ifdim\pgf@temp@b pt<0.01pt\relax%
% approximately linear
\pgfmathparseFPU{abs(2*(##2)-2*(##4)+(##6))}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\ifdim\pgfutil@tempdimb<0.1pt\relax%
% if the denominator is very small, t is *likely* large but could be 0/0
\else
\pgfmathsetmacroFPU{\pgf@temp@a}{(2*(##2)-3*(##4)+(##6))/(2*(##2)-2*(##4)+(##6))}%
\pgfmathparseFPU{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\fi%
\else
\ifdim\pgfutil@tempdima<0pt\relax% negative discriminant -> no turning point
\else
\pgfmathsetmacroFPU{\pgf@temp@a}{min(1,max(0,(\pgf@path@lasty-2*##2+##4-\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lasty-##6-3*##2+3*##4)))}%
\pgfmathparseFPU{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\pgfmathsetmacroFPU{\pgf@temp@a}{min(1,max(0,(\pgf@path@lasty-2*##2+##4+\pgf@temp@c*sqrt(\pgfutil@tempdima))/(\pgf@path@lasty-##6-3*##2+3*##4)))}%
\pgfmathparseFPU{\pgf@path@lasty*pow(1-\pgf@temp@a,3)+3*##2*pow(1-\pgf@temp@a,2)*\pgf@temp@a+3*##4*(1-\pgf@temp@a)*\pgf@temp@a*\pgf@temp@a+##6*pow(\pgf@temp@a,3)}%
\pgfutil@tempdimb=\pgfmathresult pt\relax%
\pgf@protocolsizes{##5}{\pgfutil@tempdimb}%
\fi%
\fi
\pgf@protocolsizes{\pgf@path@lastx}{\pgf@path@lasty}%
\pgf@protocolsizes{##5}{##6}%
\pgfsyssoftpath@curveto{\the##1}{\the##2}{\the##3}{\the##4}{\the##5}{\the##6}%
}
\let\pgf@nlt@curveto\pgf@lt@curveto}}
\endinput
instead. This is even slower than the above but has less problems with the dimension too large
errors.