From 5a50e4897794b109c63f39155a19d1263b842d31 Mon Sep 17 00:00:00 2001 From: Aada Date: Sun, 16 Jun 2024 21:14:11 +0200 Subject: Add drawing --- heidelberg.tex | 458 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ shape.tex | 55 +++++++ shapes.tex | 171 +++++++++++++++++++++ 3 files changed, 684 insertions(+) create mode 100644 heidelberg.tex create mode 100644 shape.tex create mode 100644 shapes.tex diff --git a/heidelberg.tex b/heidelberg.tex new file mode 100644 index 0000000..fe0cc3b --- /dev/null +++ b/heidelberg.tex @@ -0,0 +1,458 @@ +\documentclass[a4paper]{article} + +\usepackage[left=0pt, right=0pt, top=0pt, bottom=0pt]{geometry} + +\usepackage{tikz} +\usepackage{fontspec} +\usepackage{contour} + +\setmainfont{Atkinson Hyperlegible} +\usetikzlibrary{shapes.geometric} +\usetikzlibrary{calc} +\usetikzlibrary{positioning} +\usetikzlibrary{arrows.meta} + +\definecolor{one}{RGB}{243,155,154} +\definecolor{two}{RGB}{176,0,68} +\definecolor{three}{RGB}{213,173,0} +\definecolor{four}{RGB}{227,0,11} +\definecolor{five}{RGB}{0,150,94} +\definecolor{six}{RGB}{149,107,37} +\definecolor{seven}{RGB}{255,204,0} +\definecolor{fifteen}{RGB}{247,171,99} +\definecolor{sixteen}{RGB}{94,107,175} +\definecolor{twentyone}{RGB}{227,0,11} +\definecolor{twentytwo}{RGB}{253,195,0} +\definecolor{twentythree}{RGB}{228,142,0} +\definecolor{twentyfour}{RGB}{140,29,117} +\definecolor{twentysix}{RGB}{243,155,154} + +\input{shapes.tex} + +\begin{document} +\begin{center} +\hspace{0pt} +\vfill + +\pgfdeclarelayer{bg} +\pgfdeclarelayer{lines} +\pgfdeclarelayer{stops} +\pgfdeclarelayer{labels} +\pgfsetlayers{bg,lines,stops,labels,main} + +\contourlength{.2ex} + +\def\offsetanchor#1#2{\pgfmathparse{#2*tan(#1/2)}\pgfmathresult} + +\begin{tikzpicture}[ + stop/.style = { + rounded corners=0.1cm, + line width=0.05cm, + fill=white, + draw, + shape=stop, + anchor=center, + minimum height=0.2cm, + }, + stop1/.style = { + stop, + minimum width=0.2cm, + }, + stop2/.style = { + stop, + minimum width=0.4cm, + }, + stop3/.style = { + stop, + minimum width=0.6cm, + }, + stop4/.style = { + stop, + minimum width=0.8cm, + }, + line/.style = { + line width=0.15cm, + rounded corners=0.1cm, + }, + label/.style = { + font=\scriptsize, + }, + ] + \begin{pgfonlayer}{bg} + \draw[help lines, color=gray!10] (-10, -15) grid[step=0.1] (10, 10); + \draw[help lines, color=gray!50] (-10, -15) grid (10, 10); + \end{pgfonlayer} + + \begin{pgfonlayer}{stops} + \node[stop3, rotate=90] (Hauptbahnhof) at (-0.5, -1.4) {}; + \node[stop3, rotate=90] (Betriebshof) at (-0.5, 0.4) {}; + \node[stop2] (Jahnstr) at (0, 1.4) {}; + \node[stop2] (Bunsengymnasium) at (0, 2.0) {}; + \node[stop2] (Technologiepark) at (0, 2.6) {}; + \node[stop2, rotate=-45] (Heiligenbergschule) at (0.5, 3.3) {}; + \node[stop4] (Hans Thoma Platz) at (1.3, 4.1) {}; + \node[stop3, above=0.6cm of Hans Thoma Platz.two quarter, anchor=one half] (Biethsstr) {}; + \node[stop3, above=0.6cm of Biethsstr.center, anchor=center] (Burgstr) {}; + \node[stop2, rotate=90] (Volkshochschule) at (0.5,0.5) {}; + \node[stop2, rotate=90] (Campus Bergheim) at (1.1,0.5) {}; + \node[stop2, rotate=90] (Altes Hallenbad) at (1.7,0.5) {}; + \node[stop4] (Bismarckplatz) at (3.0,0.9) {}; + \node[stop2] (Brückenstr) at (2.8,1.4) {}; + \node[stop2] (Kußmaulstr) at (2.8,2.0) {}; + \node[stop2] (Blumenthalstr) at (2.8,2.6) {}; + \node[stop2, rotate=45] (Kapellenweg) at (2.2, 3.3) {}; + \node[stop4, rotate=90] (Seegarten) at (2.3,-1.5) {}; + \node[stop4, rotate=90] (Stadtbücherei) at (1.8,-1.5) {}; + \node[stop3, rotate=90] (Stadtwerke) at (0.7,-1.4) {}; + \node[stop1,rotate=45] (Gneisenaustr Süd) at ($(Hauptbahnhof.center)-(2.5,-1.6)$) {}; + \node[stop1, rotate=45, above left=0.5cm of Gneisenaustr Süd.center, anchor=center] (Berufsschule) {}; + \node[stop1, rotate=45, above left=0.5cm of Berufsschule.center, anchor=center] (Ochsenkopf) {}; + \node[stop1] (SRH Campus) at ($(Ochsenkopf.center)-(0.3,-0.6)$){}; + \node[stop1, above=0.3cm of SRH Campus] (Wieblingen Mitte) {}; + \node[stop1, above=0.3cm of Wieblingen Mitte] (Taubenfeld) {}; + \node[stop2] (Römerkreis Süd) at (1.3,-2.1) {}; + \node[stop2, rotate=45] (Christuskirche) at ($(Römerkreis Süd)-(-0.5,0.7)$) {}; + \node[stop2] (Weststadt Südstadt) at ($(Christuskirche)-(-0.5,0.7)$) {}; + \node[stop2, below=0.3cm of Weststadt Südstadt] (Bergfriedhof) {}; + \node[stop2, below=0.3cm of Bergfriedhof] (Bethanienkrankenhaus) {}; + \node[stop2, below=0.3cm of Bethanienkrankenhaus] (Rheinstr) {}; + \node[stop2, below=0.3cm of Rheinstr] (Markscheide) {}; + \node[stop2, below=0.3cm of Markscheide] (Eichendorffplatz) {}; + \node[stop2, below=0.3cm of Eichendorffplatz] (Rohrbach Markt) {}; + \node[stop2, below=0.3cm of Rohrbach Markt] (Ortenauer Str) {}; + \node[stop2, below=0.3cm of Ortenauer Str] (Freiburger Str) {}; + \node[stop2, below=0.3cm of Freiburger Str] (Rohrbach Süd) {}; + \node[stop1, below=0.4cm of Rohrbach Süd.two half] (Zementwerk) {}; + \node[stop1, below=0.3cm of Zementwerk] (Johannes-Reidel-Str) {}; + \node[stop1, below=0.3cm of Johannes-Reidel-Str] (Georgi-Marktplatz) {}; + \node[stop1, below=0.3cm of Georgi-Marktplatz] (Kurpfalzcentrum) {}; + \node[stop1, below=0.3cm of Kurpfalzcentrum] (Moltkestr) {}; + \node[stop1, below=0.3cm of Moltkestr] (Leimen Friedhof) {}; + \node[stop1] (Ringstr) at ($(Stadtwerke.one half)-(-0.1,0.2)-(0.6,0.6)$) {}; + \node[stop1, below left=0.3cm of Ringstr] (Montpellierbrücke) {}; + \node[stop2, rotate=45, anchor=two half] (Hauptbahnhof Süd) at (-1.7, -2.3) {}; + \node[stop1] (Czernybrücke) at (-1.6, 0.2) {}; + \node[stop2, rotate=45, anchor=two half] (Gadamerplatz) at (-2.5,-1.5) {}; + \node[stop1, rotate=45, above left=1cm of Gadamerplatz.two half, anchor=center] (Eppelheimer Terrasse) {}; + \node[stop1, anchor=center] (Henkel Teroson Str) at ($(Eppelheimer Terrasse)+(-0.5,0.5)-(0.3,0.0)$){}; + \node[stop1, left=0.3cm of Henkel Teroson Str] (Marktstr) {}; + \node[stop1, left=0.3cm of Marktstr] (Kranichweg Stotz) {}; + \node[stop1, left=0.3cm of Kranichweg Stotz] (Jakobsgasse) {}; + \node[stop1, left=0.3cm of Jakobsgasse] (Eppelheimer Rathaus) {}; + \node[stop1, left=0.3cm of Eppelheimer Rathaus] (Eppelheim Kirchheimer Str) {}; + \node[stop1] (Rudolf-Diesel-Str) at ($(Hauptbahnhof Süd.one half)-(-1.0,1.0)-(0,0.5)$) {}; + \node[stop1, below=0.3cm of Rudolf-Diesel-Str] (Messplatz) {}; + \node[stop1, below=0.3cm of Messplatz] (Ilse-Krall-Str) {}; + \node[stop1, below=0.3cm of Ilse-Krall-Str] (Albert-Fritz-Str) {}; + \node[stop1, below=0.3cm of Albert-Fritz-Str] (Odenwaldstr) {}; + \node[stop1, below=0.3cm of Odenwaldstr] (Kirchheim Rathaus) {}; + \node[stop1, below=0.3cm of Kirchheim Rathaus] (Kirchheim Friedhof) {}; + \end{pgfonlayer} + + \begin{pgfonlayer}{lines} + \pgfmathparse{0.1*tan(45/2)} + \let\offset\pgfmathresult + + \draw[line, twentysix] + (Burgstr.center) + -- (Biethsstr.center) + -- (Hans Thoma Platz.three quarter) + -- ($(Hans Thoma Platz.south three quarter)-(0,\offset)$) + -- (Kapellenweg.one half) + -- ($(Blumenthalstr.north one half)-(0,\offset)$) + -- (Kußmaulstr.one half) + -- (Brückenstr.one half) + --(Bismarckplatz.one half) + {[rounded corners=0.2cm] + -- ($(Bismarckplatz.south one half)-(0,0.1)$) + -- (Altes Hallenbad.two half) + } + -- (Campus Bergheim.two half) + -- (Volkshochschule.two half) + -- (Betriebshof.two half) + % -- ($(Betriebshof.two half)-(1.0,0)$); + -- ($(Czernybrücke)+(0.4,0.4)$) + -- (Czernybrücke) + -- ($(Gadamerplatz.one half)+(-0.4,0.4)$) + -- (Gadamerplatz.one half) + -- (Hauptbahnhof Süd.one half) + -- ($(Hauptbahnhof Süd.one half)-(-1.0,1.0)$) + -- (Rudolf-Diesel-Str) + -- (Messplatz) + -- (Ilse-Krall-Str) + -- (Albert-Fritz-Str) + -- (Odenwaldstr) + -- (Kirchheim Rathaus) + -- (Kirchheim Friedhof) + ; + + % \draw (Technologiepark.north center) -- + % node[rotate=-45,stop2,name=Heiligenbergschule] {} (Hans Thoma Platz.south center); + + \draw[line, twentyone] + (Hauptbahnhof.two half) + -- ($(Hauptbahnhof.north two half)-(0.1,0)$) + |- (Betriebshof.one half) + {[rounded corners=0.2cm] + -| (Jahnstr.one half) + } + -- (Bunsengymnasium.one half) + -- (Technologiepark.one half) + -- ($(Technologiepark.north one half)+(0,\offset)$) + -- (Heiligenbergschule.south one half) -- (Heiligenbergschule.north one half) + -- ($(Hans Thoma Platz.south one half)+(0,\offset)$) -- (Hans Thoma Platz.one half); + + \draw[line, twentyone] + (Jahnstr.one half) + {[rounded corners=0.3cm] + |- (Volkshochschule.one half) + } + -- (Campus Bergheim.one half) + {[rounded corners=0.2cm] + -- (Altes Hallenbad.one half) + % -- ($(Altes Hallenbad.south one half)+(1.3,0.0)$) + } + {[rounded corners=0.2cm] + -| ($(Seegarten.south two half)+(0.2,0)$) + } + -- (Stadtbücherei.two half) + -- (Stadtwerke.two half) + {[rounded corners=0.2cm] + -- (Hauptbahnhof.two half) + }; + + + \draw[line, twentytwo] + (Bismarckplatz.two half) + {[rounded corners=0.8cm] + |- (Stadtbücherei.north one half) + } + -- (Stadtbücherei.one half) + -- ($(Stadtwerke.one half)-(-0.1,0.2)$) + -- (Ringstr) + -- (Montpellierbrücke) + -- ($(Hauptbahnhof Süd.two half)+(1.0,-1.0)$) + -- (Hauptbahnhof Süd.two half) + -- (Gadamerplatz.two half) + -- (Eppelheimer Terrasse) + -- ($(Eppelheimer Terrasse)+(-0.5,0.5)-(0.3,0.0)$) + -- (Henkel Teroson Str) + -- (Marktstr) + -- (Kranichweg Stotz) + -- (Jakobsgasse) + -- (Eppelheimer Rathaus) + -- (Eppelheim Kirchheimer Str) + ; + + \draw[line, twentythree] + (Bismarckplatz.three quarter) + {[rounded corners=0.6cm] + |- (Stadtbücherei.north two quarter) + } + -- (Stadtbücherei.two quarter) + -| ($(Römerkreis Süd.south two half)+(0,\offset)$) + -- (Christuskirche.two half) + -- ($(Weststadt Südstadt.north two half)+(0,\offset)$) + -- (Weststadt Südstadt.two half) + -- (Bergfriedhof.two half) + -- (Bethanienkrankenhaus.two half) + -- (Rheinstr.two half) + -- (Markscheide.two half) + -- (Eichendorffplatz.two half) + -- (Rohrbach Markt.two half) + -- (Ortenauer Str.two half) + -- (Freiburger Str.two half) + -- (Rohrbach Süd.two half) + -- (Zementwerk) + -- (Johannes-Reidel-Str) + -- (Georgi-Marktplatz) + -- (Kurpfalzcentrum) + -- (Moltkestr) + -- (Leimen Friedhof) + ; + + \draw[line, twentyfour] + (Rohrbach Süd.one half) + -- (Freiburger Str.one half) + -- (Ortenauer Str.one half) + -- (Rohrbach Markt.one half) + -- (Eichendorffplatz.one half) + -- (Markscheide.one half) + -- (Rheinstr.one half) + -- (Bethanienkrankenhaus.one half) + -- (Bergfriedhof.one half) + -- (Weststadt Südstadt.one half) + -- ($(Weststadt Südstadt.north one half)-(0,\offset)$) + -- (Christuskirche.one half) + -- ($(Römerkreis Süd.south one half)-(0,\offset)$) + % (Römerkreis Süd.one half) + |- (Stadtwerke.one half) + {[rounded corners=0.3cm] + -- ($(Hauptbahnhof.south one half)+(0.1,0)$) + -| ($(Betriebshof.north center)-(0.3,0)$) + } + {[rounded corners=0.5cm] + -| (Jahnstr.two half) + } + -- (Bunsengymnasium.two half) + -- (Technologiepark.two half) -- ($(Technologiepark.north two half)-(0,\offset)$) + -- (Heiligenbergschule.south two half) -- (Heiligenbergschule.north two half) + -- ($(Hans Thoma Platz.south two quarter)-(0,\offset)$) -- (Hans Thoma Platz.two quarter) + -- (Biethsstr.one half) + -- (Burgstr.one half); + + + \draw[line, five, -{Latex[length=5mm]}] + (Burgstr.two half) -- ($(Burgstr.two half)+(0,1.0)$); + \draw[line, five, -{Latex[length=5mm]}] + (Taubenfeld) -- ($(Taubenfeld)+(0,0.8)$); + \draw[line, five] + (Burgstr.two half) + -- (Biethsstr.two half) + -- (Hans Thoma Platz.two half) + -- ($(Hans Thoma Platz.south two half)+(0,\offset)$) + -- (Kapellenweg.two half) + -- ($(Blumenthalstr.north two half)+(0,\offset)$) + -- (Blumenthalstr.two half) + -- (Kußmaulstr.two half) + -- (Brückenstr.two half) + -- (Bismarckplatz.two quarter) + {[rounded corners=0.4cm] + |- (Seegarten.north three quarter) + } + -- (Stadtbücherei.three quarter) + -- (Stadtwerke.three quarter) + -- (Hauptbahnhof.three quarter) + -- ($(Hauptbahnhof.center)-(0.9, 0)$) + -- (Gneisenaustr Süd.center) + -- (Berufsschule.center) + -- (Ochsenkopf.center) + -- ($(Ochsenkopf.center)-(0.3,-0.3)$) + -- (SRH Campus.center) + -- (SRH Campus.center) + -- (Wieblingen Mitte.center) + -- (Taubenfeld.center) + ; + + \end{pgfonlayer} + + \begin{pgfonlayer}{labels} + \foreach\stop/\placement/\anchor/\rotate in { + Hauptbahnhof/left/north/0, + Betriebshof/above left/north west/0, + Jahnstr/left/east/0, + Brückenstr/right/west/0, + Kußmaulstr/right/west/0, + Blumenthalstr/right/west/0, + Kapellenweg/right/west/0, + Bismarckplatz/right/west/0, + Jahnstr/left/east/0, + Bunsengymnasium/left/east/0, + Technologiepark/left/east/0, + Heiligenbergschule/left/east/0, + Hans Thoma Platz/right/west/0, + Biethsstr/right/west/0, + Volkshochschule/above right/west/60, + Campus Bergheim/above right/west/60, + Altes Hallenbad/above right/west/60, + Seegarten/right/east/-30, + Stadtbücherei/right/east/-30, + Stadtwerke/right/east/-30, + Römerkreis Süd/right/west/0, + Ringstr/below right/west/-45, + Montpellierbrücke/below right/west/-45, + Gneisenaustr Süd/right/west/45, + Berufsschule/right/west/45, + Ochsenkopf/right/west/45, + SRH Campus/left/east/0, + Wieblingen Mitte/left/east/0, + Taubenfeld/left/east/0, + Christuskirche/right/west/0, + Weststadt Südstadt/right/west/0, + Bergfriedhof/right/west/0, + Bethanienkrankenhaus/right/west/0, + Rheinstr/right/west/0, + Markscheide/right/west/0, + Eichendorffplatz/right/west/0, + Rohrbach Markt/right/west/0, + Ortenauer Str/right/west/0, + Freiburger Str/right/west/0, + Rohrbach Süd/right/west/0, + Zementwerk/right/west/0, + Johannes-Reidel-Str/right/west/0, + Georgi-Marktplatz/right/west/0, + Kurpfalzcentrum/right/west/0, + Moltkestr/right/west/0, + Leimen Friedhof/right/west/0, + Hauptbahnhof Süd/left/east/45, + Gadamerplatz/left/east/45, + Eppelheimer Terrasse/left/east/45, + Czernybrücke/above/south/45, + Henkel Teroson Str/below/east/45, + Marktstr/below/east/45, + Kranichweg Stotz/below/east/45, + Jakobsgasse/below/east/45, + Eppelheimer Rathaus/below/east/45, + Eppelheim Kirchheimer Str/below/east/45, + Rudolf-Diesel-Str/left/east/0, + Messplatz/left/east/0, + Ilse-Krall-Str/left/east/0, + Albert-Fritz-Str/left/east/0, + Odenwaldstr/left/east/0, + Kirchheim Rathaus/left/east/0, + Kirchheim Friedhof/left/east/0, + Burgstr/right/west/0% + } \node[label, \placement=0.05cm of \stop, rotate=\rotate, anchor=\anchor] {\contour{white}{\stop}}; + % \node[label, right=0.05cm of Altes Hallenbad, rotate=60, anchor=south west, align=left] {Altes Hallenbad}; + % \node[label, right=0.05cm of Campus Bergheim, rotate=60, anchor=south west, align=left] {Campu Bergheim}; + \end{pgfonlayer} + + + % \node[draw, fill=white, color=black, shape=stop] (test) at (Hauptbahnhof) {}; + + % \draw[line, color=twentyfour] + % (Hauptbahnhof) -- (Betriebshof) -- + % (Jahnstr) -- (Bunsengymnasium) -- + % (Technologiepark) -- (Heiligenbergschule) -- + % (Hans Thoma Platz); + % \draw[line, color=twentyone] + % ($(Hauptbahnhof)-(0.1,0)$) -- ($(Betriebshof)-(0.1,0)$) -- + % ($(Jahnstr)-(0.1,0)$) -- ($(Bunsengymnasium)-(0.1,0)$) -- + % ($(Technologiepark)-(0.1,0)$) -- ($(Heiligenbergschule)-(-45:0.1)$) -- + % ($(Hans Thoma Platz)-(0.1,0.2)$) -- ($(Hans Thoma Platz)-(0.1,0)$); + + % + % \node[stop, shape=rectangle, minimum width=0.5cm, shift={(-0.1cm, 0cm)}] at (Hans Thoma Platz) {}; + % + % \node[stop, shape=rectangle, minimum width=0.3cm, shift={(-0.05cm, 0cm)}] at (Hauptbahnhof) {}; + % \node[label, anchor=west] at (Hauptbahnhof) {Hauptbahnhof}; + % + % \node[stop, shape=rectangle, minimum width=0.3cm, shift={(-0.05cm, 0cm)}] at (Betriebshof) {}; + % \node[label, anchor=west] at (Betriebshof) {Betriebshof}; + % + % \node[stop, shape=rectangle, minimum width=0.3cm, shift={(-0.05cm, 0cm)}] at (Jahnstr) {}; + % \node[label, anchor=west] at (Jahnstr) {Jahnstr}; + % + % \node[stop, shape=rectangle, minimum width=0.3cm, shift={(-0.05cm, 0cm)}] at (Bunsengymnasium) {}; + % \node[label, anchor=west] at (Bunsengymnasium) {Bunsengymnasium}; + % + % \node[stop, shape=rectangle, minimum width=0.3cm, shift={(-0.05cm, 0cm)}] at (Technologiepark) {}; + % \node[label, anchor=west] at (Technologiepark) {Technologiepark}; + + % \draw[stop, shift={(-0.1cm,-0.1cm)}] + % (Hans Thoma Platz) + % rectangle ++(0.2cm,0.2cm) + % node[right, label] {Hans-Thoma-Platz}; + % \draw[stop] (Heiligenbergschule) circle node[right, label, anchor=north west] {Heiligenbergschule}; + % \draw[stop] (Technologiepark) circle node[right, label, anchor=north west] {Technologiepark}; + % \draw[stop] (Bunsengymnasium) circle node[right, label] {Bunsengymnasium}; + % \draw[stop] (Jahnstr) circle node[right, label] {Jahnstr}; + % \draw[stop] (Betriebshof) circle node[right, label] {Betriebshof}; + % \draw[stop] (Hauptbahnhof) circle node[right, label] {Hauptbahnhof}; +\end{tikzpicture} + +\vfill +\hspace{0pt} +\end{center} +\end{document} +% vim: nospell conceallevel=0 diff --git a/shape.tex b/shape.tex new file mode 100644 index 0000000..def5008 --- /dev/null +++ b/shape.tex @@ -0,0 +1,55 @@ +\documentclass[tikz]{standalone} + +\usetikzlibrary{positioning} + +\input{shapes.tex} + +% \tikzset{ +% shape example/.style= { +% color = black!30, +% draw, +% fill = yellow!30, +% line width = .5cm, +% % inner xsep = 2.5cm, +% % inner ysep = 0.5cm, +% rounded corners=2cm, +% } +% } + + +\begin{document} +\begin{tikzpicture} + \node[stop1, name=one] {};%{Stop\vrule width 1pt height 2cm}; + \node[stop2, name=two, below=4.5cm of one.west, anchor=west] {}; + \node[stop3, name=three, below=4.5cm of two.west, anchor=west] {}; + \node[stop4, name=four, below=4.5cm of three.west, anchor=west] {}; + \draw[gray, thin] + (one.center) -- (two.one half) -- (three.one half) -- (four.one half) + (two.two half) -- (three.center) -- (four.two quarter) + (three.two half) -- (four.three quarter) + ; + \foreach\shape in {one,two,three,four} { + \foreach\anchor/\placement in {% + % Custom anchors + one half/below, + two half/below, + two quarter/above, + three quarter/above, + south one half/left, + south two half/right, + south two quarter/below left, + south three quarter/below right, + north one half/left, + north two half/right, + north two quarter/above left, + north three quarter/above right, + % Standard anchors + south/below, + north/above, + west/left, + east/right, + center/above% + } \draw[shift=(\shape.\anchor)] plot[mark=x] coordinates{(0, 0)} node[\placement] {\tiny\texttt{(\shape.\anchor)}}; + } +\end{tikzpicture} +\end{document} diff --git a/shapes.tex b/shapes.tex new file mode 100644 index 0000000..1471807 --- /dev/null +++ b/shapes.tex @@ -0,0 +1,171 @@ +\makeatletter + +\pgfdeclareshape{stop}{% + \savedanchor{\upperrightcorner}{ + \setlength{\pgf@xa}{\pgfshapeminwidth} + \setlength{\pgf@ya}{\pgfshapeminheight} + \pgf@x=0.5\pgf@xa + \pgf@y=0.5\pgf@ya + } + \savedanchor{\lowerleftcorner}{ + \setlength{\pgf@xa}{\pgfshapeminwidth} + \setlength{\pgf@ya}{\pgfshapeminheight} + \pgf@x=-0.5\pgf@xa + \pgf@y=-0.5\pgf@ya + } + + \anchor{center}{\pgfpointorigin} + % \anchor{center}{\centerpoint} + \anchor{north east}{% + \upperrightcorner% + } + \anchor{north}{% + \upperrightcorner% + \pgf@x=0pt + } + \anchor{south east}{% + \upperrightcorner% + \pgf@y=-\pgf@y + } + \anchor{south west}{% + \lowerleftcorner% + } + \anchor{south}{% + \lowerleftcorner% + \pgf@x=0pt + } + \anchor{north west}{% + \upperrightcorner% + \pgf@x=-\pgf@x + } + \anchor{west}{% + \lowerleftcorner% + \pgf@y=0pt + } + \anchor{east}{% + \upperrightcorner% + \pgf@y=0pt + } + + \savedanchor{\outerfirstcentersecond}{ + \setlength{\pgf@xa}{\pgfshapeminwidth} + \setlength{\pgf@ya}{\pgfshapeminheight} + % \divide\pgf@xa by 3 + % \divide\pgf@xa by 2 + \pgf@x=-.5\pgf@xa + \advance\pgf@x by .5\pgf@ya + \pgf@y=\pgf@ya + } + + \anchor{one half}{ + \outerfirstcentersecond + \pgf@y=0pt + } + \anchor{two half}{ + \outerfirstcentersecond + \pgf@x=-\pgf@x + \pgf@y=0pt + } + + \anchor{north one half}{ + \outerfirstcentersecond + } + \anchor{north two half}{ + \outerfirstcentersecond + \pgf@x=-\pgf@x + } + \anchor{south one half}{ + \outerfirstcentersecond + \pgf@y=-\pgf@y + } + \anchor{south two half}{ + \outerfirstcentersecond + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + + \savedanchor{\outerfirstquarter}{ + \setlength{\pgf@xa}{\pgfshapeminwidth} + \setlength{\pgf@ya}{\pgfshapeminheight} + \pgf@y=\pgf@ya + \pgf@x=-.5\pgf@xa % We are at (shape.north west) now + \advance\pgf@x by .5\pgf@ya % We are at (shape.north one half) now + \advance\pgf@x by \pgf@ya + } + + \anchor{two quarter}{ + \outerfirstquarter + \pgf@y=0pt + } + \anchor{three quarter}{ + \outerfirstquarter + \pgf@x=-\pgf@x + \pgf@y=0pt + } + + \anchor{north two quarter}{ + \outerfirstquarter + } + \anchor{south two quarter}{ + \outerfirstquarter + \pgf@y=-\pgf@y + } + \anchor{north three quarter}{ + \outerfirstquarter + \pgf@x=-\pgf@x + } + \anchor{south three quarter}{ + \outerfirstquarter + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + + + \savedanchor{\outertop}{ + \setlength{\pgf@ya}{\pgfshapeminheight} + \pgf@x=0pt + \pgf@y=1\pgf@ya + } + + \anchor{north center}{ + \outertop + } + + \anchor{south center}{ + \outertop + \pgf@y=-\pgf@y + } + + \backgroundpath{ + \pgfpathrectanglecorners{\lowerleftcorner}{\upperrightcorner} + } +} + +\makeatother + +\tikzset{ + stop/.style={ + shape=stop, + color=black!30, + draw, + fill=yellow!30, + rounded corners=1cm, + minimum height=2cm, + }, + stop1/.style={ + stop, + minimum width=2cm, + }, + stop2/.style={ + stop, + minimum width=4cm, + }, + stop3/.style={ + stop, + minimum width=6cm, + }, + stop4/.style={ + stop, + minimum width=8cm, + }, +} -- cgit v1.2.3