summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/hatching
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
commit5dc602d16c5be2fd035b254ca23484a90aebd6dc (patch)
tree72efb15fba318cc2096a8cc6999ed3fa0bff317d /Master/texmf-dist/doc/metapost/hatching
parentb4fc5f639874db951177ec539299d20908adb654 (diff)
doc 5
git-svn-id: svn://tug.org/texlive/trunk@81 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/hatching')
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/htchuse.mp55
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/htchuse_.tex11
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/readme52
3 files changed, 118 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/hatching/htchuse.mp b/Master/texmf-dist/doc/metapost/hatching/htchuse.mp
new file mode 100644
index 00000000000..493ce3ad537
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/htchuse.mp
@@ -0,0 +1,55 @@
+%%% addto hatchfill
+%%% addto beginfig
+%%% enddef endfig
+%%% length withcolor dashed off on
+% This is a sample file demonstrating how one can use the macros defined
+% in hatching.mp.
+
+input hatching.mp;
+
+vardef star(expr n) =
+ for i_:=0 upto 2n-1:
+ if odd i_: 1/2 fi (right rotated (180*(i_/n))) --
+ endfor cycle
+enddef;
+
+beginfig(100);
+ path p; p:=unitsquare xscaled 50mm yscaled 25mm;
+ hatchfill p withcolor red withcolor (45,2mm,-.5bp) withcolor (-45,2mm,-.5bp);
+
+endfig;
+
+beginfig(101);
+ interim hatch_match:=0;
+ path p; p:=star(10) xscaled 35mm yscaled 20mm rotated 20;
+ hatchfill p withcolor (0,1,.5);
+ draw image(hatchfill p
+ withcolor (45,3bp,-.5bp) withcolor (-45,3bp,-.5bp);
+ ) withcolor red dashed evenly; % |evenly=dashpattern(on 3bp off 3bp)|
+endfig;
+
+beginfig(102);
+ path p; p:=star(10) xscaled 35mm yscaled 20mm rotated 20;
+ interim hatch_match:=0;
+ hatchoptions(withcolor blue dashed evenly scaled 2);
+ hatchfill p withcolor .75white withcolor (20,6bp,-.5bp);
+ hatchoptions(withcolor (blue+green) dashed evenly shifted (3/2bp,0));
+ hatchfill p withcolor (110,6bp,-.5bp);
+endfig;
+
+beginfig(103);
+ path p; p:=star(10) xscaled 35mm yscaled 35mm;
+ save draw_hatched_band;
+ vardef draw_hatched_band(expr za,zb,a,l,d) =
+ save n_; n_:=length(za-zb)/l;
+ for i_:=0 upto ceiling n_:
+ fill star(10) xscaled 2/5l yscaled 2/5l
+ shifted (i_/n_)[za,zb] withcolor (i_/n_)[green,blue];
+ endfor
+ enddef;
+ hatchfill p withcolor (red+green) withcolor (45,10bp,-1bp);
+endfig;
+
+end.
+%%\end
+
diff --git a/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex b/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex
new file mode 100644
index 00000000000..bf10d5c7475
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex
@@ -0,0 +1,11 @@
+\input epsf % dvips standard
+\nopagenumbers
+
+\lineskiplimit\maxdimen \lineskip5mm
+
+\centerline{\epsffile{htchuse.100}}
+\centerline{\epsffile{htchuse.101}}
+\centerline{\epsffile{htchuse.102}}
+\centerline{\epsffile{htchuse.103}}
+
+\end
diff --git a/Master/texmf-dist/doc/metapost/hatching/readme b/Master/texmf-dist/doc/metapost/hatching/readme
new file mode 100644
index 00000000000..da6ac0e89e8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/readme
@@ -0,0 +1,52 @@
+-------------------------------------+-------------------------------------
+ ENGLISH | POLSKI
+-------------------------------------+-------------------------------------
+The file HATCHING.MP contains a set | Plik HATCHING.MP zawiera zestaw makr
+of METAPOST macros for hatching | METAPOST-owych do zakreskowywania
+interior of closed paths. | wn/etrza zamkni/etych /scie/zek.
+
+ made in BOP s.c.
+ e-mail: B.Jackowski@gust.org.pl
+ public domain software
+ (no copyrights, copylefts, copyups, copydowns, or whatsoever)
+
+ 21.09.2000 -- ver 0.11 (pre-release)
+
+The basic macro, hatchfill, works | Podstawowym makrem pakietu jest makro
+very much like the standard fill | hatchfill, dzia/laj/ace bardzo
+command. The general form of the | podobnie do makra fill. Og/olna
+hatchfill command call is as | posta/c u/zycia polecenia hatchfill
+follows: | wygl/ada nast/epuj/aco:
+
+ hatchfill path_expression withcolor c1 withcolor c2 ...
+
+The trick is that for hatching | Trick polega u/zyciu specjalnych
+special ``colors'' are used, namely, | ,,kolor/ow'' -- je/sli mianowicie
+if bluepart(c)<0, the colour c is | bluepart(c)<0, to sk/ladowe koloru c
+interpreted as hatching data: | s/a traktowane jako informacja
+ | o zakreskowaniu:
+
+ hatching angle redpart(c) k/at nachylenia
+ distance between lines greenpart(c) odleg/lo/s/c mi/edzy kreskami
+ thickness of lines -bluepart(c) grubo/s/c kresek
+
+Dashing and colouring of the hatch | Za pomoc/a makra hatchoptions mo/zna
+pattern can be accomplished by | zdefiniowa/c kolor kresek a tak/ze
+using hatchoptions command (cf. | wz/or w przypadku linii przerywanych
+drawoptions in plain.mp). Actually, | (por. makro drawoptions, plain.mp).
+an arbitrary pattern can be used | W istocie dowolny obiekt mo/ze zosta/c
+instead of straight lines: it | u/zyty do wype/lnienia /scie/zki: w tym
+suffices to redefine the macro | celu nale/zy zdefiniowa/c w odpowiedni
+draw_hatched_band (cf. htchuse.mp, | spos/ob makro draw_hatched_band (por.
+figure 103), although one should be | htchuse.mp, ilustracja 103), jednak/ze
+aware that METAPOST memory can be | nale/zy pami/eta/c, /ze w ten spos/ob
+easily overloaded and that the | mo/zna /latwo wyczerpa/c zasoby
+resulting EPS files are usually | pami/eciowe METAPOST-a i /ze na og/o/l
+annoyingly large. | otrzymuje si/e pliki irytuj/aco du/ze.
+ |
+The examples of usage can be found | Przyk/lady u/zycia mo/zna znale/x/c
+in htchuse.mp; for convenience, | w pliku htchuse.mp; dla wygody
+a trivial TeX file for typesetting | do/l/aczony zosta/l trywialny pliczek
+the figures, htchuse_.tex, is | TeX-owy (htchuse_.tex), sk/ladaj/acy
+included. | jedn/a stron/e z tymi przyk/ladami.
+