aboutsummaryrefslogtreecommitdiff
path: root/shapes_simple.tex
diff options
context:
space:
mode:
authorAada2024-07-19 19:12:58 +0200
committerAada2024-07-19 19:12:58 +0200
commitec22b275c331536a5443e91533bb821c7426132f (patch)
tree93abe41315f150087ffa24c8071ff9c980e8614d /shapes_simple.tex
parentc490da9606a08521caa7dcaef84027ed8e34cc3b (diff)
Introduce simple shapes
Diffstat (limited to 'shapes_simple.tex')
-rw-r--r--shapes_simple.tex147
1 files changed, 147 insertions, 0 deletions
diff --git a/shapes_simple.tex b/shapes_simple.tex
new file mode 100644
index 0000000..88aa921
--- /dev/null
+++ b/shapes_simple.tex
@@ -0,0 +1,147 @@
+\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{\one}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 0.5\pgf@ya
+ }
+ \anchor{one}{\one}
+
+ \savedanchor{\two}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 1.5\pgf@ya
+ }
+ \anchor{two}{\two}
+
+ \savedanchor{\three}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 2.5\pgf@ya
+ }
+ \anchor{three}{\three}
+
+ \savedanchor{\four}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 3.5\pgf@ya
+ }
+ \anchor{four}{\four}
+
+
+ \savedanchor{\five}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 4.5\pgf@ya
+ }
+ \anchor{five}{\five}
+
+ \savedanchor{\six}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 5.5\pgf@ya
+ }
+ \anchor{six}{\six}
+
+ \savedanchor{\seven}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 6.5\pgf@ya
+ }
+ \anchor{seven}{\seven}
+
+ \savedanchor{\eight}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 7.5\pgf@ya
+ }
+ \anchor{eight}{\eight}
+
+ \savedanchor{\nine}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 8.5\pgf@ya
+ }
+ \anchor{nine}{\nine}
+
+ \savedanchor{\ten}{
+ \setlength{\pgf@xa}{\pgfshapeminwidth}
+ \setlength{\pgf@ya}{\pgfshapeminheight}
+ \pgf@x=-0.5\pgf@xa
+ \pgf@y=0pt
+ \advance\pgf@x by 9.5\pgf@ya
+ }
+ \anchor{ten}{\ten}
+
+ \backgroundpath{
+ \pgfpathrectanglecorners{\lowerleftcorner}{\upperrightcorner}
+ }
+}
+
+\makeatother
+