Commits

Philipp Gesang committed 38d1f17

titlo color setting

  • Participants
  • Parent commits 563c2eb

Comments (0)

Files changed (1)

File tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv

   \setinterfacevariable         {penwidth} {penwidth}
   \setinterfacevariable   {preferhundredk} {preferhundredk}
   \setinterfacevariable    {titlolocation} {titlolocation}
+  \setinterfacevariable       {titlocolor} {titlocolor}
   \setinterfacevariable        {titlomode} {titlomode}
   \setinterfacevariable        {titlospan} {titlospan}
   \setinterfacevariable            {titlo} {titlo}
   pickup pensquare yscaled \cyrnumparameter{penwidth} xscaled 1 rotated -30 ;
   draw titlo
        xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}};
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   pickup pensquare yscaled penwidth xscaled 1 rotated 70 ;
   draw titlo
        xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}};
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   pickup pensquare yscaled penwidth xscaled 1 rotated 70 ;
   draw titlo
        xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}};
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   pickup pensquare yscaled penwidth xscaled 1 rotated 80 ;
   draw titlo
        xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}};
   draw stroke
        % xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight) %% doesn’t work as expected somehow
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth)-.5*penwidth,OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   pickup pensquare yscaled penwidth xscaled 2 rotated 85 ;
   draw titlo
        xysized (Hfactor*OverlayWidth-penwidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-Vfactor*OverlayHeight) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-Vfactor*OverlayHeight)
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   pickup pensquare yscaled penwidth xscaled sqrt(2) rotated 90 ;
   draw titlo
        xysized (Hfactor*OverlayWidth-.5*penwidth,Vfactor*OverlayHeight)
-       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-(0.5*Vfactor*OverlayHeight)) ;
+       shifted (.5*(OverlayWidth-Hfactor*OverlayWidth),OverlayHeight-(0.5*Vfactor*OverlayHeight))
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   draw titlo
        xysized (Hfactor*OverlayWidth-2*penwidth,Vfactor*OverlayHeight)
        shifted ((.5*penwidth+.5*(OverlayWidth-Hfactor*OverlayWidth)),
-                (OverlayHeight-(0.7*Vfactor*OverlayHeight))) ;
+                (OverlayHeight-(0.7*Vfactor*OverlayHeight)))
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
   draw titlo
        xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
        shifted ((.5*(OverlayWidth-Hfactor*OverlayWidth)),
-                (OverlayHeight-(0.7*Vfactor*OverlayHeight))) ;
+                (OverlayHeight-(0.7*Vfactor*OverlayHeight)))
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   pickup pensquare yscaled 2 xscaled (0.5*penwidth) rotated 70;
   draw stroke
        % xysized (Hfactor*OverlayWidth,Vfactor*OverlayHeight)
        shifted ((.6*(OverlayWidth-Hfactor*OverlayWidth)),
                 (OverlayHeight-Vfactor*OverlayHeight))
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
        ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
   draw titlo
        xysized (Hfactor*OverlayWidth-2*penwidth,Vfactor*OverlayHeight)
        shifted ((.5*penwidth+.5*(OverlayWidth-Hfactor*OverlayWidth)),
-                (OverlayHeight-(0.7*Vfactor*OverlayHeight))) ;
+                (OverlayHeight-(0.7*Vfactor*OverlayHeight)))
+       withcolor \MPcolor{\cyrnumparameter{titlocolor}} ;
   setbounds currentpicture to boundingbox OverlayBox ;
 \stopuniqueMPgraphic
 
 }
 
 \def\dodo_cyrnum[#1]{%
-  \iffirstargument
-    \doifassignmentelse{#1}{\setupcyrnum[\currentcyrnum][#1]}\relax
-  \else
-    \setupcyrnum
-  \fi
+  % \iffirstargument
+    % \doifassignmentelse{#1}{\setupcyrnum[\currentcyrnum][#1]}\relax
+    \setupcyrnum[\currentcyrnum][#1]%
+  % \else
+    % \setupcyrnum
+  % \fi
   \cyrnumparameter{command}\begingroup%
   \dododo_cyrnum%
 }
         \v!penwidth=.66pt,
   \v!preferhundredk=no,
          \v!command=,
+      \v!titlocolor=black,
    \v!titlolocation=\v!middle, % final|middle -- only effective if using the font’s titlo
        \v!titlomode=5,
        \v!titlospan=3,      % n|all