X-Git-Url: https://melusine.eu.org/syracuse/G/git/?p=delaunay.git;a=blobdiff_plain;f=luamesh.sty;h=1e1a99e072986e97030abbae07984a925a3f011e;hp=081cf5a72eb722ff9fedfeadbb1d3290abfcf44d;hb=c25242309db6a2554651e368376b07d30afc3601;hpb=d865bd5b172801559649eabbef29fd8f3898ce70 diff --git a/luamesh.sty b/luamesh.sty index 081cf5a..1e1a99e 100644 --- a/luamesh.sty +++ b/luamesh.sty @@ -21,7 +21,7 @@ %\fi% % % load the lua code -\directlua{dofile("luamesh.lua")}% +\directlua{require("luamesh.lua")}% % %% % for tikz (default value) @@ -36,70 +36,68 @@ %%%%%%%%%%%%%%%% the buildMesh command -%% engine of drawing -\newif\ifluameshengineMP% +%% the user can write code (tikz or MP) +%% before and after the generated code \define@boolkey{buildMeshInc}{tikz}[true]{}% %% show the bounding box for delaunay \define@choicekey*{buildMeshInc}{bbox}[\val\nr]{none, show}{% \ifcase\nr\relax% - \def\luameshval@bm@bbox{none}% + \def\luameshval@bmi@bbox{none}% \or% - \def\luameshval@bm@bbox{bbox}% + \def\luameshval@bmi@bbox{bbox}% \fi% }% %% the scale -\define@key{buildMeshInc}{scale}[1cm]{\def\luameshval@bm@scale{#1}}% +\define@key{buildMeshInc}{scale}[1cm]{\def\luameshval@bmi@scale{#1}}% %% print ponits ? \define@choicekey*{buildMeshInc}{print}[\val\nr]{none, points}{% \ifcase\nr\relax% - \def\luameshval@bm@print{none}% + \def\luameshval@bmi@print{none}% \or% - \def\luameshval@bm@print{points}% + \def\luameshval@bmi@print{points}% \fi% }% %% the name of the point -\define@key{buildMeshInc}{meshpoint}[P]{\def\luameshval@bm@meshpoint{#1}}% +\define@key{buildMeshInc}{meshpoint}[P]{\def\luameshval@bmi@meshpoint{#1}}% %% the mode for reading the points \define@choicekey*{buildMeshInc}{mode}[\val\nr]{int, ext}{% \ifcase\nr\relax% - \def\luameshval@bm@mode{int}% + \def\luameshval@bmi@mode{int}% \or% - \def\luameshval@bm@mode{ext}% + \def\luameshval@bmi@mode{ext}% \fi% }% -% -%color %% the name of the color of drawing -\define@key{buildMeshInc}{color}[black]{\def\luameshval@bm@color{#1}}% +\define@key{buildMeshInc}{color}[black]{\def\luameshval@bmi@color{#1}}% %% the name of the color of drawing the bbox -\define@key{buildMeshInc}{colorBbox}[black]{\def\luameshval@bm@colorbbox{#1}}% +\define@key{buildMeshInc}{colorBbox}[black]{\def\luameshval@bmi@colorbbox{#1}}% % \presetkeys{buildMeshInc}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}% % -% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% the difinition BW Bowyer and Watson algo \newcommand*{\buildMeshBWinc}[4][]{% - % #1 : the string containing the list of points - % (x1,y1);(x2,y2);... or the name file containing the points - \setkeys{buildMesh}{#1} % - \def\MeshPoint{\luameshval@bm@meshpoint}% - \ifKV@buildMesh@tikz% if we are using tikz + % #1 : optionnal arguments + % #2 : the string containing the list of points + % (x1,y1);(x2,y2);... or the name file containing the points + % #3 : the code to place before the generated one + % #4 : the code to place after the generated one + \setkeys{buildMeshInc}{#1} % + \def\MeshPoint{\luameshval@bmi@meshpoint}% + \ifKV@buildMeshInc@tikz% if we are using tikz \directlua{% - buildMeshTikZ("#2","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","full","\luameshval@bm@scale","\luameshval@bm@color")% + buildMeshTikZBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval@bmi@mode","\luameshval@bmi@print","\luameshval@bmi@bbox","\luameshval@bmi@scale","\luameshval@bmi@color","\luameshval@bmi@colorbbox")% }% \else % we are using MP - \mplibcolor{\luameshmpcolor}{\luameshval@bm@color} - \mplibcolor{\luameshmpcolorBbox}{\luameshval@bm@colorbbox} + \mplibcolor{\luameshmpcolor}{\luameshval@bmi@color} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@bmi@colorbbox} \directlua{% - buildMeshMPBWinc("#2","#3","#4","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","\luameshval@bm@scale")% + buildMeshMPBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval@bmi@mode","\luameshval@bmi@print","\luameshval@bmi@bbox","\luameshval@bmi@scale")% }% % \fi% }% % %%%%%%%%%%%%%%%% the buildMeshBW command -%% engine of drawing -\newif\ifluameshengineMP% +%% the code is complete and we don't have any callbacks \define@boolkey{buildMesh}{tikz}[true]{}% %% show the bounding box for delaunay \define@choicekey*{buildMesh}{bbox}[\val\nr]{none, show}{% @@ -129,8 +127,6 @@ \def\luameshval@bm@mode{ext}% \fi% }% -% -% color %% the name of the color of drawing \define@key{buildMesh}{color}[black]{\def\luameshval@bm@color{#1}}% %% the name of the color of drawing the bbox @@ -138,16 +134,15 @@ % \presetkeys{buildMesh}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}% % -% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% the difinition BW Bowyer and Watson algo \newcommand{\buildMeshBW}[2][]{% - % #1 : the string containing the list of points + % #1 : optionnal arguments + % #2 : the string containing the list of points % (x1,y1);(x2,y2);... or the name file containing the points \setkeys{buildMesh}{#1} % \def\MeshPoint{\luameshval@bm@meshpoint}% \ifKV@buildMesh@tikz% if we are using tikz \directlua{% - buildMeshTikZ("#2","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","full","\luameshval@bm@scale","\luameshval@bm@color")% + buildMeshTikZBW("#2","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","\luameshval@bm@scale","\luameshval@bm@color","\luameshval@bm@colorbbox")% }% \else % we are using MP \mplibcolor{\luameshmpcolor}{\luameshval@bm@color} @@ -160,150 +155,271 @@ }% % % +%%%%%%%%%%%%%%%%% the trace Points macro +%% plot the list of points given in argument +% the engine +\define@boolkey{tracePoints}{tikz}[true]{}% +%% show the bounding box for delaunay +\define@choicekey*{tracePoints}{bbox}[\val\nr]{none, show}{% + \ifcase\nr\relax% + \def\luameshval@tp@bbox{none}% + \or% + \def\luameshval@tp@bbox{bbox}% + \fi% +}% +%% the scale +\define@key{tracePoints}{scale}[1cm]{\def\luameshval@tp@scale{#1}}% +%% print points +\define@choicekey*{tracePoints}{print}[\val\nr]{none, points}{% + \ifcase\nr\relax% + \def\luameshval@tp@print{none}% + \or% + \def\luameshval@tp@print{points}% + \fi% +}% +%% the name of the point +\define@key{tracePoints}{meshpoint}[P]{\def\luameshval@tp@meshpoint{#1}}% +%% the mode for reading the points +\define@choicekey*{tracePoints}{mode}[\val\nr]{int, ext}{% + \ifcase\nr\relax% + \def\luameshval@tp@mode{int}% + \or% + \def\luameshval@tp@mode{ext}% + \fi% +}% +%% the name of the color of drawing +\define@key{tracePoints}{color}[black]{\def\luameshval@tp@color{#1}}% +%% the name of the color of drawing the bbox +\define@key{tracePoints}{colorBbox}[black]{\def\luameshval@tp@colorbbox{#1}}% +% +\presetkeys{tracePoints}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}% % -%% +\newcommand{\tracePointsMesh}[2][]{% + % #1 : optionnal arguments + % #2 : the string containing the list of points + % (x1,y1);(x2,y2);... or the name file containing the points + \setkeys{tracePoints}{#1} % + \def\MeshPoint{\luameshval@tp@meshpoint}% + \ifKV@tracePoints@tikz% if we are using tikz + \directlua{% + printPointsTikZ("#2","\luameshval@tp@mode","\luameshval@tp@print","\luameshval@tp@bbox","\luameshval@tp@scale","\luameshval@tp@color","\luameshval@tp@colorbbox")% + }% + \else % we are using MP + \mplibcolor{\luameshmpcolor}{\luameshval@tp@color} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@tp@colorbbox} + \directlua{% + printPointsMP("#2","\luameshval@tp@mode","\luameshval@tp@print","\luameshval@tp@bbox","\luameshval@tp@scale")% + }% + % + \fi% +}% +% + +%%%%%%%%%%%%%%%% the trace Points macro inc with callbacks +%% engine of drawing +\define@boolkey{tracePointsInc}{tikz}[true]{}% +%% show the bounding box for delaunay +\define@choicekey*{tracePointsInc}{bbox}[\val\nr]{none, show}{% + \ifcase\nr\relax% + \def\luameshval@tpi@bbox{none}% + \or% + \def\luameshval@tpi@bbox{bbox}% + \fi% +}% +%% the scale +\define@key{tracePointsInc}{scale}[1cm]{\def\luameshval@tpi@scale{#1}}% +%% print points +\define@choicekey*{tracePointsInc}{print}[\val\nr]{none, points}{% + \ifcase\nr\relax% + \def\luameshval@tpi@print{none}% + \or% + \def\luameshval@tpi@print{points}% + \fi% +}% +%% the name of the point +\define@key{tracePointsInc}{meshpoint}[P]{\def\luameshval@tpi@meshpoint{#1}}% +%% the mode for reading the points +\define@choicekey*{tracePointsInc}{mode}[\val\nr]{int, ext}{% + \ifcase\nr\relax% + \def\luameshval@tpi@mode{int}% + \or% + \def\luameshval@tpi@mode{ext}% + \fi% +}% +% +% color +%% the name of the color of drawing +\define@key{tracePointsInc}{color}[black]{\def\luameshval@tpi@color{#1}}% +%% the name of the color of drawing the bbox +\define@key{tracePointsInc}{colorBbox}[black]{\def\luameshval@tpi@colorbbox{#1}}% +% +\presetkeys{tracePointsInc}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}% +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand*{\tracePointsMeshinc}[4][]{% + % #1 : optionnal arguments + % #2 : the string containing the list of points + % (x1,y1);(x2,y2);... or the name file containing the points + % #3 : the code to place before the generated one + % #4 : the code to place after the generated one + \setkeys{tracePointsInc}{#1} % + \def\MeshPoint{\luameshval@tpi@meshpoint}% + \ifKV@tracePointsInc@tikz% if we are using tikz + \directlua{% + buildMeshTikZ("#2","\luameshval@tpi@mode","\luameshval@tpi@print","\luameshval@tpi@bbox","full","\luameshval@tpi@sc%ale","\luameshval@tpi@color")% + }% + \else % we are using MP + \mplibcolor{\luameshmpcolor}{\luameshval@tpi@color} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@tpi@colorbbox} + \directlua{% + printPointsMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval@tpi@mode","\luameshval@tpi@print","\luameshval@tpi@bbox","\luameshval@tpi@scale")% + }% + \fi% +}% % -%%the meshAddOnePointBW commande +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% the meshAddOnePointBW commande %%engine of drawing -\newif\ifluameshengineMP% -\define@boolkey{MeshAddOne}{tikz}[true]{}% +\define@boolkey{MeshAddOneBW}{tikz}[true]{}% %% the scale -\define@key{MeshAddOne}{scale}[1cm]{\def\luameshval@scale{#1}}% +\define@key{MeshAddOneBW}{scale}[1cm]{\def\luameshval@ap@scale{#1}}% %% the name of the points -\define@key{MeshAddOne}{meshpoint}[P]{\def\luameshval@meshpoint{#1}}% +\define@key{MeshAddOneBW}{meshpoint}[P]{\def\luameshval@ap@meshpoint{#1}}% %% the name of the new point -\define@key{MeshAddOne}{newpoint}[P]{\def\luameshval@newpoint{#1}}% +\define@key{MeshAddOneBW}{newpoint}[P]{\def\luameshval@ap@newpoint{#1}}% %% a complete picture or some code of the engine -\define@choicekey*{MeshAddOne}{step}[\val\nr]{badtriangles, cavity, newtriangles}{% +\define@choicekey*{MeshAddOneBW}{step}[\val\nr]{badtriangles, cavity, newtriangles}{% \ifcase\nr\relax% - \def\luameshval@step{badT}% + \def\luameshval@ap@step{badT}% \or% - \def\luameshval@step{cavity}% + \def\luameshval@ap@step{cavity}% \or% - \def\luameshval@step{newT}% + \def\luameshval@ap@step{newT}% \fi% }% % color %% the color of drawing -\define@key{MeshAddOne}{color}[black]{\def\luameshval@color{#1}}% +\define@key{MeshAddOneBW}{color}[black]{\def\luameshval@ap@color{#1}}% %% the color of background of new element -\define@key{MeshAddOne}{colorBack}[black!20]{\def\luameshval@colorback{#1}}% +\define@key{MeshAddOneBW}{colorBack}[black!20]{\def\luameshval@ap@colorback{#1}}% %% the color of new element -\define@key{MeshAddOne}{colorNew}[red]{\def\luameshval@colornew{#1}}% +\define@key{MeshAddOneBW}{colorNew}[red]{\def\luameshval@ap@colornew{#1}}% %% the color of circoncircle -\define@key{MeshAddOne}{colorCircle}[green]{\def\luameshval@colorcircle{#1}}% +\define@key{MeshAddOneBW}{colorCircle}[green]{\def\luameshval@ap@colorcircle{#1}}% %% the name of the color of drawing the bbox -\define@key{MeshAddOne}{colorBbox}[black]{\def\luameshval@colorbbox{#1}}% +\define@key{MeshAddOneBW}{colorBbox}[black]{\def\luameshval@ap@colorbbox{#1}}% % %% a complete picture or some code of the engine -\define@choicekey*{MeshAddOne}{mode}[\val\nr]{int, ext}{% +\define@choicekey*{MeshAddOneBW}{mode}[\val\nr]{int, ext}{% \ifcase\nr\relax% - \def\luameshval@mode{int}% + \def\luameshval@ap@mode{int}% \or% - \def\luameshval@mode{ext}% + \def\luameshval@ap@mode{ext}% \fi% }% -\define@choicekey*{MeshAddOne}{bbox}[\val\nr]{none, show}{% +\define@choicekey*{MeshAddOneBW}{bbox}[\val\nr]{none, show}{% \ifcase\nr\relax% - \def\luameshval@bbox{none}% + \def\luameshval@ap@bbox{none}% \or% - \def\luameshval@bbox{bbox}% + \def\luameshval@ap@bbox{bbox}% \fi% }% -\presetkeys{MeshAddOne}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}% +\presetkeys{MeshAddOneBW}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% the difinition BW Bowyer and Watson algo \newcommand*{\meshAddPointBW}[3][]{% - % #1 : the string containing the list of points + % #1 : optionnal arguments + % #2 : the string containing the list of points % (x1,y1);(x2,y2);... or the name file containing the points - \setkeys{MeshAddOne}{#1} % - \def\MeshPoint{\luameshval@meshpoint}% - \def\NewPoint{\luameshval@newpoint}% - \ifKV@MeshAddOne@tikz% if we are using tikz + \setkeys{MeshAddOneBW}{#1} % + \def\MeshPoint{\luameshval@ap@meshpoint}% + \def\NewPoint{\luameshval@ap@newpoint}% + \ifKV@MeshAddOneBW@tikz% if we are using tikz \directlua{% - buildMeshTikZ("#2","\luameshval@mode","\luameshval@print","\luameshval@bbox","full","\luameshval@scale","\luameshval@color")% + TeXOnePointTikZBW("#2","#3","\luameshval@ap@step","\luameshval@ap@scale","\luameshval@ap@mode","\luameshval@ap@bbox","\luameshval@ap@color","\luameshval@ap@colorback","\luameshval@ap@colornew","\luameshval@ap@colorcircle","\luameshval@ap@colorbbox")% }% \else % we are using MP - \mplibcolor{\luameshmpcolor}{\luameshval@color} - \mplibcolor{\luameshmpcolorBack}{\luameshval@colorback} - \mplibcolor{\luameshmpcolorNew}{\luameshval@colornew} - \mplibcolor{\luameshmpcolorCircle}{\luameshval@colorcircle} - \mplibcolor{\luameshmpcolorBbox}{\luameshval@colorbbox} + \mplibcolor{\luameshmpcolor}{\luameshval@ap@color} + \mplibcolor{\luameshmpcolorBack}{\luameshval@ap@colorback} + \mplibcolor{\luameshmpcolorNew}{\luameshval@ap@colornew} + \mplibcolor{\luameshmpcolorCircle}{\luameshval@ap@colorcircle} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@ap@colorbbox} \directlua{% - TeXOnePointMPBW("#2","#3","\luameshval@step","\luameshval@scale","\luameshval@mode","\luameshval@bbox")% + TeXOnePointMPBW("#2","#3","\luameshval@ap@step","\luameshval@ap@scale","\luameshval@ap@mode","\luameshval@ap@bbox")% }% % \fi% }% -%%% the meshAddPointBWinc commande +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% the meshAddPointBWinc commande with callbacks %% engine of drawing -\newif\ifluameshengineMP% \define@boolkey{MeshAddOneBWinc}{tikz}[true]{}% %% the scale -\define@key{MeshAddOneBWinc}{scale}[1cm]{\def\luameshval@scale{#1}}% +\define@key{MeshAddOneBWinc}{scale}[1cm]{\def\luameshval@api@scale{#1}}% %% the name of the points -\define@key{MeshAddOneBWinc}{meshpoint}[P]{\def\luameshval@meshpoint{#1}}% +\define@key{MeshAddOneBWinc}{meshpoint}[P]{\def\luameshval@api@meshpoint{#1}}% %% the name of the new point -\define@key{MeshAddOneBWinc}{newpoint}[P]{\def\luameshval@newpoint{#1}}% +\define@key{MeshAddOneBWinc}{newpoint}[P]{\def\luameshval@api@newpoint{#1}}% %% a complete picture or some code of the engine \define@choicekey*{MeshAddOneBWinc}{step}[\val\nr]{badtriangles, cavity, newtriangles}{% \ifcase\nr\relax% - \def\luameshval@step{badT}% + \def\luameshval@api@step{badT}% \or% - \def\luameshval@step{cavity}% + \def\luameshval@api@step{cavity}% \or% - \def\luameshval@step{newT}% + \def\luameshval@api@step{newT}% \fi% }% % color %% the color of drawing -\define@key{MeshAddOneBWinc}{color}[black]{\def\luameshval@color{#1}}% +\define@key{MeshAddOneBWinc}{color}[black]{\def\luameshval@api@color{#1}}% %% the color of background of new element -\define@key{MeshAddOneBWinc}{colorBack}[black!20]{\def\luameshval@colorback{#1}}% +\define@key{MeshAddOneBWinc}{colorBack}[black!20]{\def\luameshval@api@colorback{#1}}% %% the color of new element -\define@key{MeshAddOneBWinc}{colorNew}[red]{\def\luameshval@colornew{#1}}% +\define@key{MeshAddOneBWinc}{colorNew}[red]{\def\luameshval@api@colornew{#1}}% %% the color of circoncircle -\define@key{MeshAddOneBWinc}{colorCircle}[green]{\def\luameshval@colorcircle{#1}}% -\define@key{MeshAddOneBWinc}{colorBbox}[black]{\def\luameshval@colorbbox{#1}}% +\define@key{MeshAddOneBWinc}{colorCircle}[green]{\def\luameshval@api@colorcircle{#1}}% +\define@key{MeshAddOneBWinc}{colorBbox}[black]{\def\luameshval@api@colorbbox{#1}}% % %% a complete picture or some code of the engine \define@choicekey*{MeshAddOneBWinc}{mode}[\val\nr]{int, ext}{% \ifcase\nr\relax% - \def\luameshval@mode{int}% + \def\luameshval@api@mode{int}% \or% - \def\luameshval@mode{ext}% + \def\luameshval@api@mode{ext}% \fi% }% \define@choicekey*{MeshAddOneBWinc}{bbox}[\val\nr]{none, show}{% \ifcase\nr\relax% - \def\luameshval@bbox{none}% + \def\luameshval@api@bbox{none}% \or% - \def\luameshval@bbox{bbox}% + \def\luameshval@api@bbox{bbox}% \fi% }% \presetkeys{MeshAddOneBWinc}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% the difinition BW embedded code between the 2 last arguments \newcommand*{\meshAddPointBWinc}[5][]{% - % #1 : the string containing the list of points + % #1 : optionnal arguments + % #2 : the string containing the list of points % (x1,y1);(x2,y2);... or the name file containing the points + % #3 : the code to place before the generated one + % #4 : the code to place after the generated one \setkeys{MeshAddOneBWinc}{#1} % - \def\MeshPoint{\luameshval@meshpoint}% - \def\NewPoint{\luameshval@newpoint}% - \ifKV@MeshAddOne@tikz% if we are using tikz + \def\MeshPoint{\luameshval@api@meshpoint}% + \def\NewPoint{\luameshval@api@newpoint}% + \ifKV@MeshAddOneBWinc@tikz% if we are using tikz \directlua{% - buildMeshTikZ("#2","\luameshval@mode","\luameshval@print","\luameshval@bbox","full","\luameshval@scale","\luameshval@color")% + TeXOnePointTikZBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval@ap@step","\luameshval@ap@scale","\luameshval@ap@mode","\luameshval@ap@bbox","\luameshval@ap@color","\luameshval@ap@colorback","\luameshval@ap@colornew","\luameshval@ap@colorcircle","\luameshval@ap@colorbbox")% }% \else % we are using MP - \mplibcolor{\luameshmpcolor}{\luameshval@color} - \mplibcolor{\luameshmpcolorBack}{\luameshval@colorback} - \mplibcolor{\luameshmpcolorNew}{\luameshval@colornew} - \mplibcolor{\luameshmpcolorCircle}{\luameshval@colorcircle} - \mplibcolor{\luameshmpcolorBbox}{\luameshval@colorbbox} + \mplibcolor{\luameshmpcolor}{\luameshval@api@color} + \mplibcolor{\luameshmpcolorBack}{\luameshval@api@colorback} + \mplibcolor{\luameshmpcolorNew}{\luameshval@api@colornew} + \mplibcolor{\luameshmpcolorCircle}{\luameshval@api@colorcircle} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@api@colorbbox} \directlua{% - TeXOnePointMPBWinc("#2","#3","#4","#5","\luameshval@step","\luameshval@scale","\luameshval@mode","\luameshval@bbox")% + TeXOnePointMPBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval@api@step","\luameshval@api@scale","\luameshval@api@mode","\luameshval@api@bbox")% }% % \fi%