From cf73f8509ae8f801e24d312c5bb582dc31addc11 Mon Sep 17 00:00:00 2001
From: tomsmeding <hallo@tomsmeding.nl>
Date: Mon, 12 Oct 2015 20:30:27 +0200
Subject: Add optional angle argument to \hoekje

---
 giraf.sty | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'giraf.sty')

diff --git a/giraf.sty b/giraf.sty
index b5ef2e8..87690d4 100644
--- a/giraf.sty
+++ b/giraf.sty
@@ -59,11 +59,14 @@
 	\\%
 }
 
-\newcommand\hoekje{%
+\newcommand\hoekje[1][90]{%
 	\raisebox{-0.5pt}{%
 		\begin{tikzpicture}[scale=0.25]
-		\draw [line cap=round] (0,1) -- (0,0) -- (1,0);
-		\draw[black,fill=black] (0.3,0.3) circle [radius=0.15];
+		\def\ang{(#1)}
+		\def\dotdist{(2/(\ang/6+3)+0.3)}
+		\def\dotscale{((0.15-0.5/(\ang/15+0.5/0.15))*(\ang>19))}
+		\draw [line cap=round] ({cos(\ang)},{sin(\ang)}) -- (0,0) -- (1,0);
+		\draw [black,fill=black] ({\dotdist * cos(\ang/2)},{\dotdist * sin(\ang/2)}) circle [radius=\dotscale];
 		\end{tikzpicture}%
 	}%
 }
-- 
cgit v1.2.3-54-g00ecf

