summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-04 23:08:52 +0000
committerKarl Berry <karl@freefriends.org>2018-12-04 23:08:52 +0000
commit3865c2c0c5140b0d004e5944bd0afb132df802d7 (patch)
tree173db495c51db7f5832f310f7aadda766617afb9 /Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty
parentb247da06b06a75f5d7b971654f9f289d108f0b37 (diff)
pst-venn (4dec18)
git-svn-id: svn://tug.org/texlive/trunk@49316 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty')
-rw-r--r--Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty122
1 files changed, 122 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty b/Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty
new file mode 100644
index 00000000000..ef07a1b89ee
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pst-venn/pst-venn.sty
@@ -0,0 +1,122 @@
+%% $Id: pst-venn.sty 848 2018-12-04 09:25:49Z herbert $
+%%
+%% This is file `pst-venn.sty',
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+%% Herbert Voss <hvoss _at_ tug.org (Germany)
+%%
+%% DESCRIPTION:
+%% `pst-venn' is a package for Venn diagrams
+%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{pstricks}
+\RequirePackage{pst-xkey}
+%
+\def\filedate{2018/12/04}
+\def\fileversion{0.01}
+\ProvidesPackage{pst-venn}[\filedate\ v\fileversion\ drawing Venn diagrams (hv)]
+%
+\pst@addfams{pst-venn}
+\define@key[psset]{pst-venn}{bgradius}[3]{\def\psVenn@bgradius{#1}}
+\define@key[psset]{pst-venn}{bgcolor}[blue!40]{\def\psVenn@bgcolor{#1}}
+\define@key[psset]{pst-venn}{fgcolor}[red!40]{\def\psVenn@fgcolor{#1}}
+\define@key[psset]{pst-venn}{vennfill}[solid]{\def\psVenn@fillstyle{#1}}
+\define@boolkey[psset]{pst-venn}[Pst@]{bgcircle}[true]{}
+
+\psset[pst-venn]{bgcircle,bgradius=3,bgcolor=blue!40,fgcolor=red!40,vennfill=solid}
+
+\def\psVenn{\pst@object{psVenn}}
+\def\psVenn@i(#1)(#2)(#3)#4#5{%
+ \begingroup
+ \use@par
+ \ifPst@bgcircle\pscircle[fillstyle=solid,fillcolor=\psVenn@bgcolor](0,0){\psVenn@bgradius}\fi
+ \psVenn@ii(#1)(#2)(#3){#4}#5\@nil
+ \pscircle(#1){#4}% to get the clipped circle lines
+ \pscircle(#2){#4}
+ \pscircle(#3){#4}
+ \endgroup
+}
+\def\psVenn@ii(#1)(#2)(#3)#4#5#6\@nil{%
+ \ifcase#5
+ \or %1
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#2){#4}\pscircle(#3){#4}}%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#3){#4}}%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#1){#4}
+ \endpsclip
+ \or %2
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#1){#4}\pscircle(#3){#4}}%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#3){#4}}%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#2){#4}
+ \endpsclip
+ \or %3
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#1){#4}\pscircle(#2){#4}
+ }%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#2){#4}
+ }%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#3){#4}
+ \endpsclip
+ \or %4
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-3,-3)(3,3)
+ \pscircle(#1){#4}\pscircle(#3){#4}}%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#2){#4}}%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#3){#4}
+ \endpsclip
+ \or %5
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-3,-3)(3,3)
+ \pscircle(#1){#4}\pscircle(#2){#4}}%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#3){#4}}%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#1){#4}
+ \endpsclip
+ \or %6
+ \psclip[clipcommand=eoclip]{%
+ \pscustom[linestyle=none]{%
+ \psframe(-3,-3)(3,3)
+ \pscircle(#2){#4}\pscircle(#3){#4}}%
+ \pscustom[linestyle=none]{%
+ \psframe(-\maxdimen,-\maxdimen)(\maxdimen,\maxdimen)
+ \pscircle(#1){#4}}%
+ }%
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#2){#4}
+ \endpsclip
+ \or %7
+ \psclip{\pscircle(#1){#4}\pscircle(#3){#4}}
+ \pscircle[fillstyle=\psVenn@fillstyle,fillcolor=\psVenn@fgcolor](#2){#4}
+ \endpsclip
+ \else
+ \fi
+ \ifx\relax#6\relax \def\next{}\else\def\next{\psVenn@ii(#1)(#2)(#3){#4}#6\@nil}\fi
+ \next
+}
+
+\endinput