From 0d72266e5d47c25e293c8eda1478e4be140f68ef Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Fri, 30 Apr 2021 13:46:47 +0200 Subject: [PATCH] add qR and qA --- laantas-script/Svg.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/laantas-script/Svg.hs b/laantas-script/Svg.hs index 6f53a8c..743e050 100644 --- a/laantas-script/Svg.hs +++ b/laantas-script/Svg.hs @@ -9,7 +9,7 @@ where import Control.Monad.Reader import Control.Monad.State import qualified Graphics.Svg as Base -import Graphics.Svg hiding (mA, mR, lA, lR, cA, cR, sA, sR, aA, aR) +import Graphics.Svg hiding (mA, mR, lA, lR, cA, cR, sA, sR, aA, aR, qA, qR) import Data.Text (Text, pack) @@ -66,6 +66,18 @@ cR (x1, y1) (x2, y2) (x3, y3) = (x3 * size) (y3 * size) <> " " -- lmao +qA :: Point -> Point -> M Text +qA (x1, y1) (x2, y2) = + reader \E {size} -> + Base.qA (x1 * size) (y1 * size) + (x2 * size) (y2 * size) + +qR :: Point -> Point -> M Text +qR (x1, y1) (x2, y2) = + reader \E {size} -> + Base.qR (x1 * size) (y1 * size) + (x2 * size) (y2 * size) + data Arc = Large | Small data Sweep = CW | CCW