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}

Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!
tikz-pgf pstricks asymptote
add a comment |
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}

Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!
tikz-pgf pstricks asymptote
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
add a comment |
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}

Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!
tikz-pgf pstricks asymptote
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}

Note: Please don't suggest solution with clipping or intersection. Answers in TikZ and Asymptote are welcome!
tikz-pgf pstricks asymptote
tikz-pgf pstricks asymptote
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
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
up vote
13
down vote
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".

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.
add a comment |
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}

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}
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 whyoefillis 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
add a comment |
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}

But there are 4 problems:
fillstyle=oefill,fillcolor=bluecannot be swapped. In other words,fillcolor=blue,fillstyle=oefilldoes not produce the expected result.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
%.- The crescent-like regions are no longer transparent because they have been filled by a solid white.
- Clipping with odd-even rule is not possible because
/oeclipdoes not exist.
The trailing space in 2 has been removed.
– Artificial Stupidity
Nov 30 '17 at 14:53
add a comment |
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)
?
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
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
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".

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.
add a comment |
up vote
13
down vote
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".

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.
add a comment |
up vote
13
down vote
up vote
13
down vote
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".

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.
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".

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.
answered Sep 13 '13 at 6:50
Werner
433k609531635
433k609531635
add a comment |
add a comment |
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}

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}
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 whyoefillis 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
add a comment |
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}

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}
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 whyoefillis 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
add a comment |
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}

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}
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}

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}
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 whyoefillis 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
add a comment |
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 whyoefillis 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
add a comment |
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}

But there are 4 problems:
fillstyle=oefill,fillcolor=bluecannot be swapped. In other words,fillcolor=blue,fillstyle=oefilldoes not produce the expected result.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
%.- The crescent-like regions are no longer transparent because they have been filled by a solid white.
- Clipping with odd-even rule is not possible because
/oeclipdoes not exist.
The trailing space in 2 has been removed.
– Artificial Stupidity
Nov 30 '17 at 14:53
add a comment |
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}

But there are 4 problems:
fillstyle=oefill,fillcolor=bluecannot be swapped. In other words,fillcolor=blue,fillstyle=oefilldoes not produce the expected result.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
%.- The crescent-like regions are no longer transparent because they have been filled by a solid white.
- Clipping with odd-even rule is not possible because
/oeclipdoes not exist.
The trailing space in 2 has been removed.
– Artificial Stupidity
Nov 30 '17 at 14:53
add a comment |
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}

But there are 4 problems:
fillstyle=oefill,fillcolor=bluecannot be swapped. In other words,fillcolor=blue,fillstyle=oefilldoes not produce the expected result.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
%.- The crescent-like regions are no longer transparent because they have been filled by a solid white.
- Clipping with odd-even rule is not possible because
/oeclipdoes not exist.
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}

But there are 4 problems:
fillstyle=oefill,fillcolor=bluecannot be swapped. In other words,fillcolor=blue,fillstyle=oefilldoes not produce the expected result.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
%.- The crescent-like regions are no longer transparent because they have been filled by a solid white.
- Clipping with odd-even rule is not possible because
/oeclipdoes not exist.
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
add a comment |
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
add a comment |
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)
?
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
add a comment |
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)
?
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
add a comment |
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)
?
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)
?
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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