How to invert even-odd filling?











up vote
13
down vote

favorite












Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even number of strokes will be filled?



documentclass[pstricks,border=12pt]{standalone}


begin{document}

begin{pspicture}[linewidth=2pt](6,4)

pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none]
{
psellipse(4,2)(2,2)
moveto(4,2)
psellipse(2,2)(2,2)
}

psellipse[linecolor=yellow](4,2)(2,2)
psellipse[linecolor=green](2,2)(2,2)


end{pspicture}

end{document}


enter image description here



Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!










share|improve this question
























  • Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
    – percusse
    Sep 12 '13 at 19:48












  • @percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
    – kiss my armpit
    Sep 13 '13 at 1:32






  • 1




    Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
    – Charles Staats
    Dec 29 '13 at 19:43










  • @CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
    – kiss my armpit
    Dec 29 '13 at 19:45

















up vote
13
down vote

favorite












Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even number of strokes will be filled?



documentclass[pstricks,border=12pt]{standalone}


begin{document}

begin{pspicture}[linewidth=2pt](6,4)

pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none]
{
psellipse(4,2)(2,2)
moveto(4,2)
psellipse(2,2)(2,2)
}

psellipse[linecolor=yellow](4,2)(2,2)
psellipse[linecolor=green](2,2)(2,2)


end{pspicture}

end{document}


enter image description here



Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!










share|improve this question
























  • Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
    – percusse
    Sep 12 '13 at 19:48












  • @percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
    – kiss my armpit
    Sep 13 '13 at 1:32






  • 1




    Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
    – Charles Staats
    Dec 29 '13 at 19:43










  • @CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
    – kiss my armpit
    Dec 29 '13 at 19:45















up vote
13
down vote

favorite









up vote
13
down vote

favorite











Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even number of strokes will be filled?



documentclass[pstricks,border=12pt]{standalone}


begin{document}

begin{pspicture}[linewidth=2pt](6,4)

pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none]
{
psellipse(4,2)(2,2)
moveto(4,2)
psellipse(2,2)(2,2)
}

psellipse[linecolor=yellow](4,2)(2,2)
psellipse[linecolor=green](2,2)(2,2)


end{pspicture}

end{document}


enter image description here



Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!










share|improve this question















Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even number of strokes will be filled?



documentclass[pstricks,border=12pt]{standalone}


begin{document}

begin{pspicture}[linewidth=2pt](6,4)

pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none]
{
psellipse(4,2)(2,2)
moveto(4,2)
psellipse(2,2)(2,2)
}

psellipse[linecolor=yellow](4,2)(2,2)
psellipse[linecolor=green](2,2)(2,2)


end{pspicture}

end{document}


enter image description here



Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!







tikz-pgf pstricks asymptote






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '13 at 16:33

























asked Sep 12 '13 at 18:51









kiss my armpit

12.3k20167400




12.3k20167400












  • Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
    – percusse
    Sep 12 '13 at 19:48












  • @percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
    – kiss my armpit
    Sep 13 '13 at 1:32






  • 1




    Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
    – Charles Staats
    Dec 29 '13 at 19:43










  • @CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
    – kiss my armpit
    Dec 29 '13 at 19:45




















  • Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
    – percusse
    Sep 12 '13 at 19:48












  • @percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
    – kiss my armpit
    Sep 13 '13 at 1:32






  • 1




    Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
    – Charles Staats
    Dec 29 '13 at 19:43










  • @CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
    – kiss my armpit
    Dec 29 '13 at 19:45


















Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
– percusse
Sep 12 '13 at 19:48






Well you have three regions so it's blue white blue. No clip no intersection how would you get white blue white ? You need an even number of pathsbut then first/last one would be blue
– percusse
Sep 12 '13 at 19:48














@percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
– kiss my armpit
Sep 13 '13 at 1:32




@percusse: By inverting the even-odd rule, theoretically we can get what I want to have.
– kiss my armpit
Sep 13 '13 at 1:32




1




1




Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
– Charles Staats
Dec 29 '13 at 19:43




Since zero is even, if you invert the even-odd rule, then theoretically the unbounded region outside all your paths will also be filled. Is this what you want? I'm not just being facetious: if it is, then you can simply add a huge circle or rectangle that encompasses your entire picture and use the usual even-odd rule (although I suppose this requires that you clip the picture to its bounding box; is that too much clipping?). If you don't want the outside filled, then your fill rule involves a special case and will probably require actual programming.
– Charles Staats
Dec 29 '13 at 19:43












@CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
– kiss my armpit
Dec 29 '13 at 19:45






@CharlesStaats: I have tried the idea with a huge circle or rectangle and I don't like the output.
– kiss my armpit
Dec 29 '13 at 19:45












4 Answers
4






active

oldest

votes

















up vote
13
down vote



+300










The Postscript Language Reference does not provide, for example, an Odd-Even Rule (oefill) counterpart to the Even-Odd Rule (eofill). So, you have to find a way to retrace the entire area - specific to the shape - so that "odd" regions become "even", and "even" ones become "odd".



enter image description here



documentclass[pstricks,border=5pt]{standalone}
usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
begin{document}
begin{pspicture}[linewidth=2pt](6,4)
pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none,linewidth=0pt]
{%
psellipticarc(2,2)(2,2){60}{-300}% Left (complete) ellipse/circle
psellipticarc(4,2)(2,2){120}{-240}% Right (complete) ellipse/circle
psellipticarc(2,2)(2,2){60}{-60}% Left (incomplete) segment
psellipticarc(4,2)(2,2){-120}{120}% Right (incomplete) segment
}%
psellipse[linecolor=yellow](4,2)(2,2)
psellipse[linecolor=green](2,2)(2,2)
end{pspicture}

end{document}


The 4 stages of construction to recreate and retrace the shape is presented requires some explanation:




  • The bizarre angles from which the shapes are drawn (say, from 60 to -300, spanning 360 degrees) is to fool TeX to draw a full revolution. Drawing an arc from 60 to 60 makes it non-existent.

  • The choice for drawing these arcs based around the intersection is because the pen movement may cause some artifacts to show in the output (thin lines that have zero width, yet still show at certain zoom levels). Focusing on the intersection point as an interchange between shapes removes this annoying artifact.






share|improve this answer




























    up vote
    1
    down vote













    documentclass[pstricks,border=12pt]{standalone}
    begin{document}

    begin{pspicture}[linewidth=2pt](6,4)
    pscustom[linestyle=none,fillstyle=eofill]{% NO fillcolor
    psellipse(4,2)(2,2)psellipse(2,2)(2,2)
    fill[fillcolor=red,fillstyle=solid]
    }
    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)
    end{pspicture}

    end{document}


    enter image description here



    or with the current pstricks.tex from http://texnik.dante.de/tex/generic/pstricks/



    documentclass[pstricks,border=12pt]{standalone}
    begin{document}

    begin{pspicture}[linewidth=2pt](6,4)
    pscustom[linestyle=none,fillstyle=oefill,fillcolor=blue]{% color _after_ style!
    psellipse(4,2)(2,2)psellipse(2,2)(2,2)
    }
    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)
    end{pspicture}

    end{document}





    share|improve this answer























    • Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
      – kiss my armpit
      Jan 16 '14 at 2:55










    • I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
      – kiss my armpit
      Jan 16 '14 at 7:43


















    up vote
    1
    down vote



    accepted










    The newest pstricks.tex provides an experimental value oefill which is the complement of eofill.



    documentclass[pstricks,border=12pt]{standalone}


    begin{document}

    begin{pspicture}[linewidth=2pt,showgrid](6,4)

    pscustom[fillstyle=oefill,fillcolor=blue,linestyle=none]
    {
    psellipse(4,2)(2,2)
    moveto(4,2)
    psellipse(2,2)(2,2)
    }

    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)


    end{pspicture}

    end{document}


    enter image description here



    But there are 4 problems:




    1. fillstyle=oefill,fillcolor=blue cannot be swapped. In other words, fillcolor=blue,fillstyle=oefill does not produce the expected result.


    2. The output gets unintentionally displaced to the right (see carefully the given output above). Probably because of white spaces that have not been disabled via %.


    3. The crescent-like regions are no longer transparent because they have been filled by a solid white.

    4. Clipping with odd-even rule is not possible because /oeclip does not exist.






    share|improve this answer





















    • The trailing space in 2 has been removed.
      – Artificial Stupidity
      Nov 30 '17 at 14:53


















    up vote
    0
    down vote













    How about "clearing" unwanted parts by oefill with white?



    pscustom[fillcolor=blue,fillstyle=solid,linestyle=none]
    {
    psellipse(4,2)(2,2)
    moveto(4,2)
    psellipse(2,2)(2,2)
    }

    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)

    pscustom[fillcolor=white,fillstyle=eofill,linestyle=none]
    {
    psellipse(4,2)(2,2)
    moveto(4,2)
    psellipse(2,2)(2,2)
    }

    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)


    ?






    share|improve this answer





















    • No. It is not useful for clipping.
      – kiss my armpit
      Dec 29 '13 at 17:18










    • So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
      – Jori Mäntysalo
      Dec 29 '13 at 20:46










    • I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
      – kiss my armpit
      Dec 29 '13 at 20:50













    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f133025%2fhow-to-invert-even-odd-filling%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    13
    down vote



    +300










    The Postscript Language Reference does not provide, for example, an Odd-Even Rule (oefill) counterpart to the Even-Odd Rule (eofill). So, you have to find a way to retrace the entire area - specific to the shape - so that "odd" regions become "even", and "even" ones become "odd".



    enter image description here



    documentclass[pstricks,border=5pt]{standalone}
    usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
    begin{document}
    begin{pspicture}[linewidth=2pt](6,4)
    pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none,linewidth=0pt]
    {%
    psellipticarc(2,2)(2,2){60}{-300}% Left (complete) ellipse/circle
    psellipticarc(4,2)(2,2){120}{-240}% Right (complete) ellipse/circle
    psellipticarc(2,2)(2,2){60}{-60}% Left (incomplete) segment
    psellipticarc(4,2)(2,2){-120}{120}% Right (incomplete) segment
    }%
    psellipse[linecolor=yellow](4,2)(2,2)
    psellipse[linecolor=green](2,2)(2,2)
    end{pspicture}

    end{document}


    The 4 stages of construction to recreate and retrace the shape is presented requires some explanation:




    • The bizarre angles from which the shapes are drawn (say, from 60 to -300, spanning 360 degrees) is to fool TeX to draw a full revolution. Drawing an arc from 60 to 60 makes it non-existent.

    • The choice for drawing these arcs based around the intersection is because the pen movement may cause some artifacts to show in the output (thin lines that have zero width, yet still show at certain zoom levels). Focusing on the intersection point as an interchange between shapes removes this annoying artifact.






    share|improve this answer

























      up vote
      13
      down vote



      +300










      The Postscript Language Reference does not provide, for example, an Odd-Even Rule (oefill) counterpart to the Even-Odd Rule (eofill). So, you have to find a way to retrace the entire area - specific to the shape - so that "odd" regions become "even", and "even" ones become "odd".



      enter image description here



      documentclass[pstricks,border=5pt]{standalone}
      usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
      begin{document}
      begin{pspicture}[linewidth=2pt](6,4)
      pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none,linewidth=0pt]
      {%
      psellipticarc(2,2)(2,2){60}{-300}% Left (complete) ellipse/circle
      psellipticarc(4,2)(2,2){120}{-240}% Right (complete) ellipse/circle
      psellipticarc(2,2)(2,2){60}{-60}% Left (incomplete) segment
      psellipticarc(4,2)(2,2){-120}{120}% Right (incomplete) segment
      }%
      psellipse[linecolor=yellow](4,2)(2,2)
      psellipse[linecolor=green](2,2)(2,2)
      end{pspicture}

      end{document}


      The 4 stages of construction to recreate and retrace the shape is presented requires some explanation:




      • The bizarre angles from which the shapes are drawn (say, from 60 to -300, spanning 360 degrees) is to fool TeX to draw a full revolution. Drawing an arc from 60 to 60 makes it non-existent.

      • The choice for drawing these arcs based around the intersection is because the pen movement may cause some artifacts to show in the output (thin lines that have zero width, yet still show at certain zoom levels). Focusing on the intersection point as an interchange between shapes removes this annoying artifact.






      share|improve this answer























        up vote
        13
        down vote



        +300







        up vote
        13
        down vote



        +300




        +300




        The Postscript Language Reference does not provide, for example, an Odd-Even Rule (oefill) counterpart to the Even-Odd Rule (eofill). So, you have to find a way to retrace the entire area - specific to the shape - so that "odd" regions become "even", and "even" ones become "odd".



        enter image description here



        documentclass[pstricks,border=5pt]{standalone}
        usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
        begin{document}
        begin{pspicture}[linewidth=2pt](6,4)
        pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none,linewidth=0pt]
        {%
        psellipticarc(2,2)(2,2){60}{-300}% Left (complete) ellipse/circle
        psellipticarc(4,2)(2,2){120}{-240}% Right (complete) ellipse/circle
        psellipticarc(2,2)(2,2){60}{-60}% Left (incomplete) segment
        psellipticarc(4,2)(2,2){-120}{120}% Right (incomplete) segment
        }%
        psellipse[linecolor=yellow](4,2)(2,2)
        psellipse[linecolor=green](2,2)(2,2)
        end{pspicture}

        end{document}


        The 4 stages of construction to recreate and retrace the shape is presented requires some explanation:




        • The bizarre angles from which the shapes are drawn (say, from 60 to -300, spanning 360 degrees) is to fool TeX to draw a full revolution. Drawing an arc from 60 to 60 makes it non-existent.

        • The choice for drawing these arcs based around the intersection is because the pen movement may cause some artifacts to show in the output (thin lines that have zero width, yet still show at certain zoom levels). Focusing on the intersection point as an interchange between shapes removes this annoying artifact.






        share|improve this answer












        The Postscript Language Reference does not provide, for example, an Odd-Even Rule (oefill) counterpart to the Even-Odd Rule (eofill). So, you have to find a way to retrace the entire area - specific to the shape - so that "odd" regions become "even", and "even" ones become "odd".



        enter image description here



        documentclass[pstricks,border=5pt]{standalone}
        usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
        begin{document}
        begin{pspicture}[linewidth=2pt](6,4)
        pscustom[fillcolor=blue,fillstyle=eofill,linestyle=none,linewidth=0pt]
        {%
        psellipticarc(2,2)(2,2){60}{-300}% Left (complete) ellipse/circle
        psellipticarc(4,2)(2,2){120}{-240}% Right (complete) ellipse/circle
        psellipticarc(2,2)(2,2){60}{-60}% Left (incomplete) segment
        psellipticarc(4,2)(2,2){-120}{120}% Right (incomplete) segment
        }%
        psellipse[linecolor=yellow](4,2)(2,2)
        psellipse[linecolor=green](2,2)(2,2)
        end{pspicture}

        end{document}


        The 4 stages of construction to recreate and retrace the shape is presented requires some explanation:




        • The bizarre angles from which the shapes are drawn (say, from 60 to -300, spanning 360 degrees) is to fool TeX to draw a full revolution. Drawing an arc from 60 to 60 makes it non-existent.

        • The choice for drawing these arcs based around the intersection is because the pen movement may cause some artifacts to show in the output (thin lines that have zero width, yet still show at certain zoom levels). Focusing on the intersection point as an interchange between shapes removes this annoying artifact.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 13 '13 at 6:50









        Werner

        433k609531635




        433k609531635






















            up vote
            1
            down vote













            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=eofill]{% NO fillcolor
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            fill[fillcolor=red,fillstyle=solid]
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}


            enter image description here



            or with the current pstricks.tex from http://texnik.dante.de/tex/generic/pstricks/



            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=oefill,fillcolor=blue]{% color _after_ style!
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}





            share|improve this answer























            • Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
              – kiss my armpit
              Jan 16 '14 at 2:55










            • I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
              – kiss my armpit
              Jan 16 '14 at 7:43















            up vote
            1
            down vote













            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=eofill]{% NO fillcolor
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            fill[fillcolor=red,fillstyle=solid]
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}


            enter image description here



            or with the current pstricks.tex from http://texnik.dante.de/tex/generic/pstricks/



            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=oefill,fillcolor=blue]{% color _after_ style!
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}





            share|improve this answer























            • Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
              – kiss my armpit
              Jan 16 '14 at 2:55










            • I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
              – kiss my armpit
              Jan 16 '14 at 7:43













            up vote
            1
            down vote










            up vote
            1
            down vote









            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=eofill]{% NO fillcolor
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            fill[fillcolor=red,fillstyle=solid]
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}


            enter image description here



            or with the current pstricks.tex from http://texnik.dante.de/tex/generic/pstricks/



            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=oefill,fillcolor=blue]{% color _after_ style!
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}





            share|improve this answer














            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=eofill]{% NO fillcolor
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            fill[fillcolor=red,fillstyle=solid]
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}


            enter image description here



            or with the current pstricks.tex from http://texnik.dante.de/tex/generic/pstricks/



            documentclass[pstricks,border=12pt]{standalone}
            begin{document}

            begin{pspicture}[linewidth=2pt](6,4)
            pscustom[linestyle=none,fillstyle=oefill,fillcolor=blue]{% color _after_ style!
            psellipse(4,2)(2,2)psellipse(2,2)(2,2)
            }
            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)
            end{pspicture}

            end{document}






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 9 '17 at 17:30









            Community

            1




            1










            answered Sep 13 '13 at 17:14









            Herbert

            267k23406716




            267k23406716












            • Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
              – kiss my armpit
              Jan 16 '14 at 2:55










            • I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
              – kiss my armpit
              Jan 16 '14 at 7:43


















            • Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
              – kiss my armpit
              Jan 16 '14 at 2:55










            • I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
              – kiss my armpit
              Jan 16 '14 at 7:43
















            Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
            – kiss my armpit
            Jan 16 '14 at 2:55




            Other mirrors such as ftp://ftp.dante.de/tex-archive/graphics/pstricks/base/generic/pstricks.tex still has the old version (they have not been updated yet). It is almost 9 days since your updated pstricks was uploaded to texnik.dante.de. That is why oefill is still not available for me to test your code.
            – kiss my armpit
            Jan 16 '14 at 2:55












            I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
            – kiss my armpit
            Jan 16 '14 at 7:43




            I have discussed this issue in the chat room: chat.stackexchange.com/transcript/message/13219527#13219527
            – kiss my armpit
            Jan 16 '14 at 7:43










            up vote
            1
            down vote



            accepted










            The newest pstricks.tex provides an experimental value oefill which is the complement of eofill.



            documentclass[pstricks,border=12pt]{standalone}


            begin{document}

            begin{pspicture}[linewidth=2pt,showgrid](6,4)

            pscustom[fillstyle=oefill,fillcolor=blue,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            end{pspicture}

            end{document}


            enter image description here



            But there are 4 problems:




            1. fillstyle=oefill,fillcolor=blue cannot be swapped. In other words, fillcolor=blue,fillstyle=oefill does not produce the expected result.


            2. The output gets unintentionally displaced to the right (see carefully the given output above). Probably because of white spaces that have not been disabled via %.


            3. The crescent-like regions are no longer transparent because they have been filled by a solid white.

            4. Clipping with odd-even rule is not possible because /oeclip does not exist.






            share|improve this answer





















            • The trailing space in 2 has been removed.
              – Artificial Stupidity
              Nov 30 '17 at 14:53















            up vote
            1
            down vote



            accepted










            The newest pstricks.tex provides an experimental value oefill which is the complement of eofill.



            documentclass[pstricks,border=12pt]{standalone}


            begin{document}

            begin{pspicture}[linewidth=2pt,showgrid](6,4)

            pscustom[fillstyle=oefill,fillcolor=blue,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            end{pspicture}

            end{document}


            enter image description here



            But there are 4 problems:




            1. fillstyle=oefill,fillcolor=blue cannot be swapped. In other words, fillcolor=blue,fillstyle=oefill does not produce the expected result.


            2. The output gets unintentionally displaced to the right (see carefully the given output above). Probably because of white spaces that have not been disabled via %.


            3. The crescent-like regions are no longer transparent because they have been filled by a solid white.

            4. Clipping with odd-even rule is not possible because /oeclip does not exist.






            share|improve this answer





















            • The trailing space in 2 has been removed.
              – Artificial Stupidity
              Nov 30 '17 at 14:53













            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            The newest pstricks.tex provides an experimental value oefill which is the complement of eofill.



            documentclass[pstricks,border=12pt]{standalone}


            begin{document}

            begin{pspicture}[linewidth=2pt,showgrid](6,4)

            pscustom[fillstyle=oefill,fillcolor=blue,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            end{pspicture}

            end{document}


            enter image description here



            But there are 4 problems:




            1. fillstyle=oefill,fillcolor=blue cannot be swapped. In other words, fillcolor=blue,fillstyle=oefill does not produce the expected result.


            2. The output gets unintentionally displaced to the right (see carefully the given output above). Probably because of white spaces that have not been disabled via %.


            3. The crescent-like regions are no longer transparent because they have been filled by a solid white.

            4. Clipping with odd-even rule is not possible because /oeclip does not exist.






            share|improve this answer












            The newest pstricks.tex provides an experimental value oefill which is the complement of eofill.



            documentclass[pstricks,border=12pt]{standalone}


            begin{document}

            begin{pspicture}[linewidth=2pt,showgrid](6,4)

            pscustom[fillstyle=oefill,fillcolor=blue,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            end{pspicture}

            end{document}


            enter image description here



            But there are 4 problems:




            1. fillstyle=oefill,fillcolor=blue cannot be swapped. In other words, fillcolor=blue,fillstyle=oefill does not produce the expected result.


            2. The output gets unintentionally displaced to the right (see carefully the given output above). Probably because of white spaces that have not been disabled via %.


            3. The crescent-like regions are no longer transparent because they have been filled by a solid white.

            4. Clipping with odd-even rule is not possible because /oeclip does not exist.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 17 '14 at 7:58









            kiss my armpit

            12.3k20167400




            12.3k20167400












            • The trailing space in 2 has been removed.
              – Artificial Stupidity
              Nov 30 '17 at 14:53


















            • The trailing space in 2 has been removed.
              – Artificial Stupidity
              Nov 30 '17 at 14:53
















            The trailing space in 2 has been removed.
            – Artificial Stupidity
            Nov 30 '17 at 14:53




            The trailing space in 2 has been removed.
            – Artificial Stupidity
            Nov 30 '17 at 14:53










            up vote
            0
            down vote













            How about "clearing" unwanted parts by oefill with white?



            pscustom[fillcolor=blue,fillstyle=solid,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)

            pscustom[fillcolor=white,fillstyle=eofill,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            ?






            share|improve this answer





















            • No. It is not useful for clipping.
              – kiss my armpit
              Dec 29 '13 at 17:18










            • So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
              – Jori Mäntysalo
              Dec 29 '13 at 20:46










            • I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
              – kiss my armpit
              Dec 29 '13 at 20:50

















            up vote
            0
            down vote













            How about "clearing" unwanted parts by oefill with white?



            pscustom[fillcolor=blue,fillstyle=solid,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)

            pscustom[fillcolor=white,fillstyle=eofill,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            ?






            share|improve this answer





















            • No. It is not useful for clipping.
              – kiss my armpit
              Dec 29 '13 at 17:18










            • So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
              – Jori Mäntysalo
              Dec 29 '13 at 20:46










            • I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
              – kiss my armpit
              Dec 29 '13 at 20:50















            up vote
            0
            down vote










            up vote
            0
            down vote









            How about "clearing" unwanted parts by oefill with white?



            pscustom[fillcolor=blue,fillstyle=solid,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)

            pscustom[fillcolor=white,fillstyle=eofill,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            ?






            share|improve this answer












            How about "clearing" unwanted parts by oefill with white?



            pscustom[fillcolor=blue,fillstyle=solid,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)

            pscustom[fillcolor=white,fillstyle=eofill,linestyle=none]
            {
            psellipse(4,2)(2,2)
            moveto(4,2)
            psellipse(2,2)(2,2)
            }

            psellipse[linecolor=yellow](4,2)(2,2)
            psellipse[linecolor=green](2,2)(2,2)


            ?







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 29 '13 at 16:48









            Jori Mäntysalo

            662619




            662619












            • No. It is not useful for clipping.
              – kiss my armpit
              Dec 29 '13 at 17:18










            • So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
              – Jori Mäntysalo
              Dec 29 '13 at 20:46










            • I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
              – kiss my armpit
              Dec 29 '13 at 20:50




















            • No. It is not useful for clipping.
              – kiss my armpit
              Dec 29 '13 at 17:18










            • So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
              – Jori Mäntysalo
              Dec 29 '13 at 20:46










            • I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
              – kiss my armpit
              Dec 29 '13 at 20:50


















            No. It is not useful for clipping.
            – kiss my armpit
            Dec 29 '13 at 17:18




            No. It is not useful for clipping.
            – kiss my armpit
            Dec 29 '13 at 17:18












            So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
            – Jori Mäntysalo
            Dec 29 '13 at 20:46




            So, what you want is complicated clipping rule? Must to think about this... Does this help: texample.net/tikz/examples/venn-diagram
            – Jori Mäntysalo
            Dec 29 '13 at 20:46












            I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
            – kiss my armpit
            Dec 29 '13 at 20:50






            I am not looking for those Venn diagrams. My question is about how to invert clipping rule.
            – kiss my armpit
            Dec 29 '13 at 20:50




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f133025%2fhow-to-invert-even-odd-filling%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?