diff options
Diffstat (limited to 'tex/context/base/colo-ini.mkiv')
-rw-r--r-- | tex/context/base/colo-ini.mkiv | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index 1eb3d8d7e..937f85278 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -248,7 +248,7 @@ \fi % \setfalse\c_colo_convert_gray - \getvalue{\??colorconversions\directcolorsparameter\c!conversion}% could be a nice \ifcsname + \begincsname\??colorconversions\directcolorsparameter\c!conversion\endcsname % too often: \ifconditional\c_colo_rgb_supported \colo_helpers_show_message\m!colors{10}\v!rgb \fi \ifconditional\c_colo_cmyk_supported\colo_helpers_show_message\m!colors{10}\v!cmyk\fi @@ -646,17 +646,20 @@ \def\colo_helpers_activate_yes#1% {\edef\currentcolorname{#1}% \ifcsname\??colorsetter\currentcolorprefix\currentcolorname\endcsname - \csname\??colorsetter\currentcolorprefix\currentcolorname\endcsname + %\csname\??colorsetter\currentcolorprefix\currentcolorname\endcsname + \lastnamedcs \csname\??transparencysetter\currentcolorprefix\currentcolorname\endcsname \else\ifcsname\??colorsetter\currentcolorname\endcsname - \csname\??colorsetter\currentcolorname\endcsname + %\csname\??colorsetter\currentcolorname\endcsname + \lastnamedcs \csname\??transparencysetter\currentcolorname\endcsname \fi\fi} \def\colo_helpers_activate_nop#1% {\edef\currentcolorname{#1}% \ifcsname\??colorsetter\currentcolorname\endcsname - \csname\??colorsetter\currentcolorname\endcsname + %\csname\??colorsetter\currentcolorname\endcsname + \lastnamedcs \csname\??transparencysetter\currentcolorname\endcsname \fi} @@ -674,10 +677,12 @@ \unexpanded\def\dousecurrentcolorparameter {\let\currentcolorname\currentcolorparameter % maybe only when success \ifcsname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname - \csname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname + %\csname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname + \lastnamedcs \csname\??transparencysetter\currentcolorprefix\currentcolorparameter\endcsname \else\ifcsname\??colorsetter\currentcolorparameter\endcsname - \csname\??colorsetter\currentcolorparameter\endcsname + %\csname\??colorsetter\currentcolorparameter\endcsname + \lastnamedcs \csname\??transparencysetter\currentcolorparameter\endcsname \fi\fi} @@ -1018,10 +1023,15 @@ \setvalue{\??colorattribute currentcolor}{\the\attribute\colorattribute} % for mpcolor \setvalue{\??transparencyattribute currentcolor}{\the\attribute\transparencyattribute} % for mpcolor -\def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname} -\def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname} -\def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname} -\def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname} +%def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname} +%def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname} +%def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname} +%def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname} + +\def\colo_helpers_inherited_current_ca#1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\!!zerocount\fi\fi} +\def\colo_helpers_inherited_current_cs#1{\ifcsname\??colorsetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorsetter #1\endcsname\lastnamedcs\else\fi\fi} +\def\colo_helpers_inherited_current_ta#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi\fi} +\def\colo_helpers_inherited_current_ts#1{\ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\else\fi\fi} %D Low level defs: @@ -1078,10 +1088,13 @@ \colo_helpers_inherited_current_ta{#1} } -\def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname} -\def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname} \def\thecolormodelattribute {\the\attribute\colormodelattribute} +%def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname} +%def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname} + +\def\thecolorattribute #1{\number\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi\fi} +\def\thetransparencyattribute#1{\number\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi\fi} \def\internalspotcolorname #1{\clf_spotcolorname \thecolorattribute{#1} } \def\internalspotcolorparent #1{\clf_spotcolorparent\thecolorattribute{#1} } \def\internalspotcolorsize #1{\clf_spotcolorvalue \thecolorattribute{#1} } |