diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex index fb9283571c9..9f13aab2a0e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex @@ -374,6 +374,76 @@ }% }% +% This is JUST a curveto operation! Nothing special. +\pgfplotsdeclarepatchclass{bezier spline}{% + get dimension=\def\pgfplotsretval{1}, + supports global path=\def\pgfplotsretval{1}, + new=\def\pgfplotspatchclass@cspline@no{A}, + set next vertex={% + % EXPECTED ORDERING: first 2 corners, then 2 control points + % (NOT interpolatory). + % defines \pgfplotspatchclass@cspline@A ... \pgfplotspatchclass@cspline@D (4 points) + \expandafter\edef\csname pgfplotspatchclass@cspline@\pgfplotspatchclass@cspline@no\endcsname{#1}% + \if D\pgfplotspatchclass@cspline@no + \def\pgfplotspatchclass@cspline@no{A}% + \pgfplotspatchready + \else + \expandafter\let\expandafter\pgfplotspatchclass@cspline@no\csname pgfpptchindexnext@\pgfplotspatchclass@cspline@no\endcsname + \fi + }, + if current point can be first last={% + \pgfplots@loc@tmpfalse + \if B\pgfplotspatchclass@cspline@no + % Ah - the current point is the 'A' point (we have + % advanced the '@no' counter) + \pgfplots@loc@tmptrue + \fi + \if C\pgfplotspatchclass@cspline@no + % Ah - the current point is the 'B' point (we have + % advanced the '@no' counter) + \pgfplots@loc@tmptrue + \fi + \ifpgfplots@loc@tmp + #1\relax% + \else + #2\relax + \fi + }, + first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@A\endvertex, + foreach vertex={% + \expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@A\endvertex #1% + \expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@B\endvertex #1% + \expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@C\endvertex #1% + \expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@D\endvertex #1% + }, + fill path={% + % Draw the patch boundary using a bezier curve. + \pgfplotsplothandlermesh@pathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@A\endvertex}% + \pgfpathcurveto { + \expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@C\endvertex + }{ + \expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@D\endvertex + }{% + \expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@B\endvertex + }% + \pgfplotsplothandlermesh@setlastpoint{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@B\endvertex}% + }, + triangulate class=\def\pgfplotsretval{line}, + triangulate={% + \let\pgfplotsplothandlermesh@patchclass@=\pgfplotsplothandlermesh@patchclass + \def\pgfplotsplothandlermesh@patchclass{line}% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{new}% + % XXX : very poor quality ... + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotspatchclass@cspline@A}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotspatchclass@cspline@B}% + \let\pgfplotsplothandlermesh@patchclass=\pgfplotsplothandlermesh@patchclass@ + },% + get pdf shading type=0, + get num vertices=\def\pgfplotsretval{4}, +}% + + + % make a linearized sequence around the edge of the quad.triangle. % note the ordering: first 3 corners, then 3 mid nodes: \def\pgfplots@qtri@next@A{D}% |