<div dir="ltr">Hello Herbert,<div><br></div><div>It works now, thank you very much.<br><div class="gmail_extra"><br><div class="gmail_quote">2017-02-02 19:00 GMT+08:00  <span dir="ltr"><<a href="mailto:pstricks-request@tug.org" target="_blank">pstricks-request@tug.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send PSTricks mailing list submissions to<br>
        <a href="mailto:pstricks@tug.org">pstricks@tug.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://tug.org/mailman/listinfo/pstricks" rel="noreferrer" target="_blank">http://tug.org/mailman/<wbr>listinfo/pstricks</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:pstricks-request@tug.org">pstricks-request@tug.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pstricks-owner@tug.org">pstricks-owner@tug.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of PSTricks digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: what's wrong with these codes (from pstricks manual<br>
      (p223) (Herbert Voss)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Wed, 1 Feb 2017 16:43:29 +0100<br>
From: Herbert Voss <Herbert.Voss@FU-Berlin.DE><br>
To: <a href="mailto:pstricks@tug.org">pstricks@tug.org</a><br>
Subject: Re: [pstricks] what's wrong with these codes (from pstricks<br>
        manual (p223)<br>
Message-ID: <de8fdc6b-3996-71ba-f4e2-<wbr>8026c4a57651@FU-Berlin.DE><br>
Content-Type: text/plain; charset=windows-1252; format=flowed<br>
<br>
Am 01.02.2017 um 02:40 schrieb Dong Li:<br>
> Hello,<br>
><br>
>      what's wrong with these codes (from pstricks manual (p223). It doesn't<br>
>      work. Who can help me modify these codes. Thanks!<br>
<br>
what means "it doesn't work"??<br>
<br>
Herbert<br>
<br>
<br>
><br>
><br>
><br>
>     \documentclass{article}<br>
>     \usepackage[dvipsnames,<wbr>x11names,svgnames]{pstricks}<br>
><br>
>     \makeatletter<br>
>     \define@key[psset]{}{SurfaceA}<wbr>{\def\PstColorSynthesis@<wbr>SurfaceA{#1}}<br>
>     \define@key[psset]{}{SurfaceB}<wbr>{\def\PstColorSynthesis@<wbr>SurfaceB{#1}}<br>
>     \define@key[psset]{}{SurfaceC}<wbr>{\def\PstColorSynthesis@<wbr>SurfaceC{#1}}<br>
>     \define@key[psset]{}{ColorA}{\<wbr>def\PstColorSynthesis@ColorA{#<wbr>1}}<br>
>     \define@key[psset]{}{ColorB}{\<wbr>def\PstColorSynthesis@ColorB{#<wbr>1}}<br>
>     \define@key[psset]{}{ColorC}{\<wbr>def\PstColorSynthesis@ColorC{#<wbr>1}}<br>
>     \def\PstColorSynthesis{\pst@<wbr>object{PstColorSynthesis}}%<br>
>     \def\PstColorSynthesis@i{{%<br>
>                     \psset{linestyle=none}%<br>
>                     \use@par% Assignment of local parameters<br>
>                     \bgroup<br>
><br>
>     \psset{fillstyle=solid,<wbr>fillcolor=\PstColorSynthesis@<wbr>ColorA}%<br>
>                     \PstColorSynthesis@SurfaceA<br>
>                     \psset{fillcolor=\<wbr>PstColorSynthesis@ColorB}%<br>
>                     \PstColorSynthesis@SurfaceB<br>
>                     \psset{fillcolor=\<wbr>PstColorSynthesis@ColorC}%<br>
>                     \PstColorSynthesis@SurfaceC<br>
>                     \egroup<br>
>                     \PstColorSynthesis@<wbr>ClippedSurfaces{A}{B}{<wbr>NoSurface}%<br>
>                     \PstColorSynthesis@<wbr>ClippedSurfaces{A}{C}{<wbr>NoSurface}%<br>
>                     \PstColorSynthesis@<wbr>ClippedSurfaces{B}{C}{<wbr>NoSurface}%<br>
>                     \PstColorSynthesis@<wbr>ClippedSurfaces{A}{B}{C}}}<br>
><br>
>     \def\PstColorSynthesis@<wbr>ColorNoSurface{}<br>
>     % We draw the first surface #1 clipped by the one<br>
>     % or two others #2 and #3, computing it resulting color<br>
>     \def\PstColorSynthesis@<wbr>ClippedSurfaces#1#2#3{%<br>
>             % We compute the ?mixed? color, component by component<br>
>             \def\PstColorSynthesis@<wbr>MixedColorR{0}%<br>
>             \def\PstColorSynthesis@<wbr>MixedColorG{0}%<br>
>             \def\PstColorSynthesis@<wbr>MixedColorB{0}%<br>
>             % \pst@dimd will contain the maximum value of the three<br>
>             % components.<br>
>             \pst@dimd=\z@<br>
>             \PstColorSynthesis@MixedColor{<wbr>%<br>
>                     \csname PstColorSynthesis@Color#1\<wbr>endcsname}%<br>
>             \PstColorSynthesis@MixedColor{<wbr>%<br>
>                     \csname PstColorSynthesis@Color#2\<wbr>endcsname}%<br>
>             \PstColorSynthesis@MixedColor{<wbr>%<br>
>                     \csname PstColorSynthesis@Color#3\<wbr>endcsname}%<br>
>             % We must test if the maximum of the new computed<br>
>             % component is greater than 1, in which case we divide all<br>
>             % the three components by this value for additive synthesis.<br>
>             \ifdim\pst@dimd>\@ne\p@<br>
><br>
>     \PstColorSynthesis@MixedColor@<wbr>iii{\PstColorSynthesis@<wbr>MixedColorR}%<br>
><br>
>     \PstColorSynthesis@MixedColor@<wbr>iii{\PstColorSynthesis@<wbr>MixedColorG}%<br>
><br>
>     \PstColorSynthesis@MixedColor@<wbr>iii{\PstColorSynthesis@<wbr>MixedColorB}%<br>
>             \fi<br>
>             % We draw the first surface, clipped by the other ones<br>
>             \psclip{\csname PstColorSynthesis@Surface#2\<wbr>endcsname%<br>
>                     \csname PstColorSynthesis@Surface#3\<wbr>endcsname}<br>
>             \definecolor{MixedColor}{rgb}{<wbr>\PstColorSynthesis@MixedColorR<wbr>,<br>
>                     \PstColorSynthesis@MixedColorG<wbr>,<br>
>                     \PstColorSynthesis@MixedColorB<wbr>}%<br>
>             \psset{fillstyle=solid,<wbr>fillcolor=MixedColor}%<br>
>             \csname PstColorSynthesis@Surface#1\<wbr>endcsname<br>
>             \endpsclip}<br>
>     \def\PstColorSynthesis@<wbr>MixedColor#1{%<br>
>             \edef\@tempa{#1}%<br>
>             \ifx\@tempa\@empty<br>
>             \else<br>
>             \pst@expandafter\<wbr>PstColorSynthesis@MixedColor@<wbr>i{%<br>
>                     \csname\string\color@#1\<wbr>endcsname}\@nil<br>
>             \fi}<br>
><br>
>     \def\PstColorSynthesis@<wbr>MixedColor@i#1 #2 #3 #4\@nil{%<br>
>             % We receive the name of the color model (?rgb? is expected<br>
>             % here and the three color components.)<br>
>             % We add the values to the respective components of the new<br>
>             % color to compute.<br>
>             \PstColorSynthesis@MixedColor@<wbr>ii{%<br>
>                     \PstColorSynthesis@MixedColorR<wbr>}{#2}%<br>
>             \PstColorSynthesis@MixedColor@<wbr>ii{%<br>
>                     \PstColorSynthesis@MixedColorG<wbr>}{#3}%<br>
>             \PstColorSynthesis@MixedColor@<wbr>ii{%<br>
>                     \PstColorSynthesis@MixedColorB<wbr>}{#4}}<br>
><br>
>     \def\PstColorSynthesis@<wbr>MixedColor@ii#1#2{%<br>
>             % As these values are real numbers, we use dimension<br>
>             % registers, then we assign the computed value in a macro,<br>
>             % converting it from a dimension to a number.<br>
>             % We also keep in \pst@dimd the maximum of the values.<br>
>             \pst@dimg=#1\p@<br>
>             \advance\pst@dimg by #2\p@<br>
>             \pst@dimtonum{\pst@dimg}{#1}%<br>
>             \ifdim\pst@dimg>\pst@dimd<br>
>             \pst@dimd=\pst@dimg<br>
>             \fi}<br>
><br>
>     \def\PstColorSynthesis@<wbr>MixedColor@iii#1{%<br>
>             \pst@divide{#1\p@}{\pst@dimd}{<wbr>#1}%<br>
>             % We must take care of possible rounding problems with<br>
>             % \pst@divide (for instance, 1.8/1.8 give 1.0001)<br>
>             \ifdim#1\p@>\@ne\p@<br>
>             \def#1{1}%<br>
>             \fi}<br>
><br>
>     % We redefine Cyan, Magenta and Yellow in the ?rgb? model<br>
>     \definecolor{Cyan}{rgb}{0,1,1}<wbr>%<br>
>     \definecolor{Magenta}{rgb}{1,<wbr>0,1}%<br>
>     \definecolor{Yellow}{rgb}{1,1,<wbr>0}%<br>
>     \makeatother<br>
><br>
>     \begin{document}<br>
><br>
>             \begin{pspicture}<br>
>             \PstColorSynthesis[SurfaceA={\<wbr>pscircle{2}},<br>
>             SurfaceB={\pscircle(2,0){2}},<wbr>SurfaceC={\pscircle(1,2){2}},<br>
>             ColorA=Cyan,ColorB=Magenta,<wbr>ColorC=Yellow]<br>
><br>
>     \PstColorSynthesis[SurfaceA={\<wbr>psccurve(-3,1)(0,2.5)(2,1.5)(<wbr>4,3)(4,-1)<br>
>                     (3,0)(1,-2.5)(-1,-1)(-3,-3)},<br>
>             SurfaceB={\psellipticarc(0,-1)<wbr>(3,1.5){41}{-92}},<br>
>             SurfaceC={\pstriangle(1,-2)(5,<wbr>5)},<br>
>             ColorA=SlateBlue,ColorB=<wbr>Orange,ColorC=Pink]<br>
>             \end{pspicture}<br>
>     \end{document}<br>
><br>
><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> PSTricks mailing list<br>
> <a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>
> <a href="http://tug.org/mailman/listinfo/pstricks" rel="noreferrer" target="_blank">http://tug.org/mailman/<wbr>listinfo/pstricks</a><br>
> archive: <a href="http://www.tug.org/pipermail/pstricks/" rel="noreferrer" target="_blank">http://www.tug.org/pipermail/<wbr>pstricks/</a><br>
><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
PSTricks mailing list<br>
<a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>
<a href="http://tug.org/mailman/listinfo/pstricks" rel="noreferrer" target="_blank">http://tug.org/mailman/<wbr>listinfo/pstricks</a><br>
<br>
<br>
------------------------------<br>
<br>
End of PSTricks Digest, Vol 168, Issue 2<br>
******************************<wbr>**********<br>
</blockquote></div><br></div></div></div>