From 11a36dc12d07d6957138e35f89401eee4bd9b4ba Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 28 Jul 2007 00:35:14 +0000 Subject: pst-grad 1.06 (11jul07) git-svn-id: svn://tug.org/texlive/trunk@4677 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-grad/Changes | 2 + Master/texmf-dist/doc/generic/pst-grad/README | 12 -- .../doc/generic/pst-grad/pst-grad-doc.bib | 14 +- .../doc/generic/pst-grad/pst-grad-doc.pdf | Bin 250091 -> 253878 bytes Master/texmf-dist/dvips/pst-grad/pst-grad.pro | 179 +++++++++++++-------- Master/texmf-dist/source/generic/pst-grad/Makefile | 49 ------ .../texmf-dist/tex/generic/pst-grad/pst-grad.tex | 35 ++-- 7 files changed, 150 insertions(+), 141 deletions(-) delete mode 100644 Master/texmf-dist/doc/generic/pst-grad/README delete mode 100644 Master/texmf-dist/source/generic/pst-grad/Makefile (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pst-grad/Changes b/Master/texmf-dist/doc/generic/pst-grad/Changes index 4d49656c304..4697c081504 100644 --- a/Master/texmf-dist/doc/generic/pst-grad/Changes +++ b/Master/texmf-dist/doc/generic/pst-grad/Changes @@ -2,11 +2,13 @@ pst-grad.sty -------- 2006-08-01 message for loading the pro file pst-grad.tex -------- +v 1.06 2007/05/24 add cmyk option (hv) v 1.05 2006/11/04 integrate the GradientHSB from package pst-ghsb, which is now obsolete (hv) v 1.00 2006/08/13 use pst-xkey for key handling (hv) pst-grad.pro -------- +v 1.06 2007/05/24 add ifCMYK switch (hv) v 1.05 2006/11/04 integrate the GradientHSB from package pst-ghsb, which is now obsolete (hv) diff --git a/Master/texmf-dist/doc/generic/pst-grad/README b/Master/texmf-dist/doc/generic/pst-grad/README deleted file mode 100644 index c6f9ec9c72f..00000000000 --- a/Master/texmf-dist/doc/generic/pst-grad/README +++ /dev/null @@ -1,12 +0,0 @@ -pst-grad: gradient color fillings - -pst-grad.sty - The LaTeX file -pst-grad.tex - The TeX file -pst-grad.pro - The dvips header file -pst-grad-doc.tex - The documentation, source file -pst-grad-doc.bib - The documentation, bibtex data file -pst-grad-doc.pdf - The documentation, pdf - - --- -Herbert Voss 2006-11-01 diff --git a/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.bib b/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.bib index 574da56412a..f67eb4c8403 100644 --- a/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.bib @@ -46,7 +46,7 @@ Organization = {}, Address = {\url{http://www.tug.org/application/PSTricks}}, Note = {}, - year = 1993 + year = 2006 } @Manual{pst-eps, @@ -55,7 +55,7 @@ Organization = {}, Address = {\url{CTAN:graphics/pstricks/generic/}}, Note = {}, - year = 1999 + year = 2003 } @Manual{multido, @@ -64,15 +64,15 @@ Organization = {}, Address = {\url{CTAN:/graphics/pstricks/generic/multido.tex}}, Note = {}, - year = 1997 + year = 2004 } @Book{PSTricks2, author = {Herbert Vo\ss{}}, title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {third}, + edition = {forth}, publisher = {DANTE -- Lehmanns}, - year = {2006}, + year = {2007}, address = {Heidelberg/Hamburg} } @@ -109,7 +109,7 @@ Organization = {}, Address = {\url{CTAN:/macros/latex/contrib/xkeyval/}}, Note = {}, - year = 2004, + year = 2006, } @Manual{darmstadt, @@ -136,7 +136,7 @@ Organization = {}, Address = {\url{CTAN: /graphics/pstricks/contrib/pstricks-add/}}, Note = {}, - year = 2004, + year = 2007, } @Article{dtk02.2:jackson.voss, diff --git a/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.pdf b/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.pdf index c9a7b2111df..89c3207966a 100644 Binary files a/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.pdf and b/Master/texmf-dist/doc/generic/pst-grad/pst-grad-doc.pdf differ diff --git a/Master/texmf-dist/dvips/pst-grad/pst-grad.pro b/Master/texmf-dist/dvips/pst-grad/pst-grad.pro index e3d87c1bfd0..a988521c5d5 100644 --- a/Master/texmf-dist/dvips/pst-grad/pst-grad.pro +++ b/Master/texmf-dist/dvips/pst-grad/pst-grad.pro @@ -15,75 +15,106 @@ /tx@GradientDict 40 dict def tx@GradientDict begin /GradientFill { + /ifCMYK exch def % do we have rgb or cmyk? hv 1.06 rotate /MidPoint ED /NumLines ED - /LastBlue ED - /LastGreen ED - /LastRed ED - /FirstBlue ED - /FirstGreen ED -/FirstRed ED -% D.G. modification begin - Apr. 9, 1998 -/GradientPosY ED -/GradientPosX ED - /GradientScale ED - /ifGradientCircle ED -% D.G. modification end - % This avoids gaps due to rounding errors: - clip - pathbbox %leave llx,lly,urx,ury on stack -% D.G. modification begin - Apr. 10, 1998 - 4 copy /ury ED /urx ED /lly ED /llx ED -% D.G. modification end - /y ED /x ED -% D.G. modification begin - Apr. 10, 1998 -ifGradientCircle - {0 GradientPosX eq - {0 GradientPosX eq {2 copy translate} if} if} + ifCMYK { + /LastBlack ED % 1.06 + /LastYellow ED % 1.06 + /LastMagenta ED % 1.06 + /LastCyan ED % 1.06 + /FirstBlack ED % 1.06 + /FirstYellow ED % 1.06 + /FirstMagenta ED % 1.06 + /FirstCyan ED % 1.06 + }{ /LastBlue ED + /LastGreen ED + /LastRed ED + /FirstBlue ED + /FirstGreen ED + /FirstRed ED + } ifelse + /GradientPosY ED + /GradientPosX ED + /GradientScale ED + /ifGradientCircle ED + % This avoids gaps due to rounding errors: + clip + pathbbox %leave llx,lly,urx,ury on stack + 4 copy /ury ED /urx ED /lly ED /llx ED + /y ED /x ED + ifGradientCircle + { 0 GradientPosX eq { 0 GradientPosX eq {2 copy translate} if } if } {2 copy translate} ifelse -% D.G. modification end - y sub neg /y ED - x sub neg /x ED % This avoids gaps due to rounding errors: - LastRed FirstRed add 2 div - LastGreen FirstGreen add 2 div - LastBlue FirstBlue add 2 div + y sub neg /y ED + x sub neg /x ED % This avoids gaps due to rounding errors: + ifCMYK { % 1.06 + LastCyan FirstCyan add 2 div % 1.06 + LastMagenta FirstMagenta add 2 div % 1.06 + LastYellow FirstYellow add 2 div % 1.06 + LastBlack FirstBlack add 2 div % 1.06 + setcmykcolor % 1.06 + }{ + LastRed FirstRed add 2 div + LastGreen FirstGreen add 2 div + LastBlue FirstBlue add 2 div setrgbcolor -% D.G. modification begin - Jul. 23, 1997 / Apr. 9, 1998 - ifGradientCircle - {/YSizePerLine y NumLines div def - /CurrentY y 2 div def - /MidLine NumLines 2 div 1 MidPoint sub mul abs cvi def} - {fill - /YSizePerLine y NumLines div def - /CurrentY 0 def - /MidLine NumLines 1 MidPoint sub mul abs cvi def} ifelse -% DG modification end - MidLine NumLines 2 sub gt - { /MidLine NumLines def } - { MidLine 2 lt { /MidLine 0 def } if } - ifelse - MidLine 0 gt - { + } ifelse + ifGradientCircle + { /YSizePerLine y NumLines div def + /CurrentY y 2 div def + /MidLine NumLines 2 div 1 MidPoint sub mul abs cvi def + }{ + fill + /YSizePerLine y NumLines div def + /CurrentY 0 def + /MidLine NumLines 1 MidPoint sub mul abs cvi def + } ifelse + MidLine NumLines 2 sub gt + { /MidLine NumLines def } + { MidLine 2 lt { /MidLine 0 def } if } ifelse + MidLine 0 gt { + ifCMYK { + /Cyan FirstCyan def + /Magenta FirstMagenta def + /Yellow FirstYellow def + /Black FirstBlack def + /CyanIncrement LastCyan FirstCyan sub MidLine 1 sub div def + /MagentaIncrement LastMagenta FirstMagenta sub MidLine 1 sub div def + /YellowIncrement LastYellow FirstYellow sub MidLine 1 sub div def + /BlackIncrement LastBlack FirstBlack sub MidLine 1 sub div def + }{ /Red FirstRed def - /Green FirstGreen def - /Blue FirstBlue def + /Green FirstGreen def + /Blue FirstBlue def /RedIncrement LastRed FirstRed sub MidLine 1 sub div def /GreenIncrement LastGreen FirstGreen sub MidLine 1 sub div def /BlueIncrement LastBlue FirstBlue sub MidLine 1 sub div def - MidLine { GradientLoop } repeat - } if - MidLine NumLines lt - { + } ifelse + MidLine { GradientLoop } repeat + } if + MidLine NumLines lt { + ifCMYK { + /Cyan LastCyan def + /Magenta LastMagenta def + /Yellow LastYellow def + /Black LastBlack def + /CyanIncrement FirstCyan LastCyan sub NumLines MidLine sub 1 sub div def + /MagentaIncrement FirstMagenta LastMagenta sub NumLines MidLine sub 1 sub div def + /YellowIncrement FirstYellow LastYellow sub NumLines MidLine sub 1 sub div def + /BlackIncrement FirstBlack LastBlack sub NumLines MidLine sub 1 sub div def + }{ /Red LastRed def - /Green LastGreen def - /Blue LastBlue def + /Green LastGreen def + /Blue LastBlue def /RedIncrement FirstRed LastRed sub NumLines MidLine sub 1 sub div def /GreenIncrement FirstGreen LastGreen sub NumLines MidLine sub 1 sub div def /BlueIncrement FirstBlue LastBlue sub NumLines MidLine sub 1 sub div def - NumLines MidLine sub { GradientLoop } repeat } - if - } def/GradientLoop { + } ifelse + NumLines MidLine sub { GradientLoop } repeat + } if +} def/GradientLoop { % D.G. modification begin - Jul. 23, 1997 / Apr. 9, 1998 ifGradientCircle {CurrentY 0 gt { @@ -92,15 +123,37 @@ ifGradientCircle {/GradientPosX urx llx sub 2 div def /GradientPosY ury lly sub 2 div def} if} if GradientPosX GradientPosY CurrentY GradientScale mul 0 360 arc - Red Green Blue setrgbcolor fill + ifCMYK { Cyan Magenta Yellow Black setcmykcolor } + { Red Green Blue setrgbcolor } ifelse + fill /CurrentY CurrentY YSizePerLine sub def - /Blue Blue BlueIncrement add def - /Green Green GreenIncrement add def - /Red Red RedIncrement add def} if} {0 CurrentY moveto x 0 rlineto + ifCMYK { + /Cyan Cyan CyanIncrement add def + /Magenta Magenta MagentaIncrement add def + /Yellow Yellow YellowIncrement add def + /Black Black BlackIncrement add def + }{ + /Blue Blue BlueIncrement add def + /Green Green GreenIncrement add def + /Red Red RedIncrement add def + } ifelse + } if } { 0 CurrentY moveto x 0 rlineto 0 YSizePerLine rlineto x neg 0 rlineto closepath - Red Green Blue setrgbcolor fill /CurrentY CurrentY YSizePerLine add def - /Blue Blue BlueIncrement add def /Green Green GreenIncrement add def - /Red Red RedIncrement add def} ifelse% D.G. modification end + ifCMYK { Cyan Magenta Yellow Black setcmykcolor } + { Red Green Blue setrgbcolor } ifelse + fill + /CurrentY CurrentY YSizePerLine add def + ifCMYK { + /Cyan Cyan CyanIncrement add def + /Magenta Magenta MagentaIncrement add def + /Yellow Yellow YellowIncrement add def + /Black Black BlackIncrement add def + }{ + /Blue Blue BlueIncrement add def + /Green Green GreenIncrement add def + /Red Red RedIncrement add def + } ifelse + } ifelse% D.G. modification end }def % /GradientFillHSB { % hv 2006-11-04 diff --git a/Master/texmf-dist/source/generic/pst-grad/Makefile b/Master/texmf-dist/source/generic/pst-grad/Makefile deleted file mode 100644 index 284fec50de7..00000000000 --- a/Master/texmf-dist/source/generic/pst-grad/Makefile +++ /dev/null @@ -1,49 +0,0 @@ - -# `Makefile' for `pst-coil.pdf', hv, 2006/08/11 - -.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps - -PACKAGE = pst-grad - -MAIN = pst-grad-doc - -LATEX = latex - -ARCHNAME = $(MAIN)-$(shell date +%y%m%d) - -ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile - -all : doc -# clean -doc: $(MAIN).pdf - -$(MAIN).pdf : $(MAIN).ps - GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< - -$(MAIN).ps : $(MAIN).dvi - dvips $< - -$(MAIN).dvi : $(MAIN).tex - $(LATEX) $< - $(LATEX) $< - if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi - if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi - makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ - $(basename $<).glo - makeindex -t $(basename $<).ilg -o $(basename $<).ind \ - $(basename $<).idx - bibtex $(basename $<) - $(LATEX) $< - $(LATEX) $< - -clean : - $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out ) - $(RM) $(addprefix $(MAIN), .dvi .ps) - -veryclean : clean - $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) - -arch : - zip $(ARCHNAME).zip $(ARCHFILES) - -# EOF diff --git a/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex b/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex index 79eb3732ae5..bbdc4ee89b0 100644 --- a/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex +++ b/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex @@ -33,6 +33,7 @@ %% GradientScale=float : scaling factor of the circled gradient %% (version 1.04) %% GradientHSB : Use HSB color model +%% cmyk : Use CMYK color model %% \csname GradientLoaded\endcsname \let\GradientLoaded\endinput @@ -41,9 +42,9 @@ \fi \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi -\def\fileversion{1.05} -\def\filedate{2006/11/04} -\message{`pst-plot' v\fileversion, \filedate\space (tvz,dg,hv)} +\def\fileversion{1.06} +\def\filedate{2006/11/27} +\message{`pst-grad' v\fileversion, \filedate\space (tvz,dg,hv)} \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 @@ -51,8 +52,17 @@ \pstheader{pst-grad.pro} -\newrgbcolor{gradbegin}{0 .1 .95} -\newrgbcolor{gradend}{0 1 1} +\define@boolkey[psset]{pst-grad}[Pst@]{cmyk}[true]{% + \ifPst@cmyk + \newcmykcolor{gradbegin}{0 .1 .95 0.1} + \newcmykcolor{gradend}{0 0.8 0.6 0.5} + \else + \newrgbcolor{gradbegin}{0 .1 .95} + \newrgbcolor{gradend}{0 1 1} + \fi% +} +\psset[pst-grad]{cmyk=false} +% \define@key[psset]{pst-grad}{gradbegin}{\pst@getcolor{#1}\psgradbegin} \define@key[psset]{pst-grad}{gradend}{\pst@getcolor{#1}\psgradend} \define@key[psset]{pst-grad}{gradlines}{% @@ -68,13 +78,15 @@ % Denis Girou - April 1998 ------- patch 2 (hv) % To define the gradient as linear or as circle +%================================================================== \define@boolkey[psset]{pst-grad}[Pst@]{GradientCircle}[true]{} % Position of the center of the gradient \define@key[psset]{pst-grad}{GradientPos}{\psset@@GradientPos#1}% - \def\psset@@GradientPos(#1){\edef\ps@GradientPos{#1}} +\def\psset@@GradientPos(#1){\edef\ps@GradientPos{#1}} % Scale factor \define@key[psset]{pst-grad}{GradientScale}{\def\ps@GradientScale{#1}} -\psset[pst-grad]{GradientScale=1,GradientPos={(0,0)},GradientCircle=false} +\psset[pst-grad]{GradientCircle=false,GradientScale=1,GradientPos={(0,0)}} +%===================================================================== % \define@boolkey[psset]{pst-grad}[Pst@]{gradientHSB}[true]{} \psset[pst-grad]{gradientHSB=false} @@ -99,14 +111,17 @@ % hv end \addto@pscode{% gsave - \ifPst@GradientCircle true \else false \fi + \ifPst@GradientCircle\space true \else false \fi \ps@GradientScale\space \pst@tempa\space - gsave \pst@usecolor\psgradbegin currentrgbcolor grestore - gsave \pst@usecolor\psgradend currentrgbcolor grestore + gsave \pst@usecolor\psgradbegin + \ifPst@cmyk currentcmykcolor \else currentrgbcolor \fi grestore + gsave \pst@usecolor\psgradend + \ifPst@cmyk currentcmykcolor \else currentrgbcolor \fi grestore \psgradlines \psgradmidpoint \psk@gradangle + \ifPst@cmyk true \else false \fi tx@GradientDict begin GradientFill end grestore% }% \fi% -- cgit v1.2.3