add qR and qA

This commit is contained in:
Rhiannon Morris 2021-04-30 13:46:47 +02:00
parent 604da055e4
commit 0d72266e5d
1 changed files with 13 additions and 1 deletions

View File

@ -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