Allow shadow fidelity option, fix bug in rendering box shadows

This commit is contained in:
2023-03-25 17:22:58 +00:00
parent cdc4a84d4b
commit d989acd6f2
26 changed files with 410 additions and 258 deletions
+4 -5
View File
@@ -14,14 +14,13 @@ drawButton bd = case bd of
drawSwitch :: Color -> Color -> Button -> SPic
drawSwitch col1 col2 bt
| _btState bt == BtOff =
flick $ pi / 4
| _btState bt == BtOff = flick $ pi / 4
| otherwise = flick (negate (pi / 4))
where
flick a =
( mconcat
[ colorSH col1 . upperPrismPoly 20 $ reverse $ rectNSWE (-2) (-5) (-10) 10
, colorSH col2 . translateSH (V3 0 (-2) 20) . rotateSH a . upperPrismPoly 2 $
[ colorSH col1 . upperBox Small Typical 20 $ reverse $ rectNSWE (-2) (-5) (-10) 10
, colorSH col2 . translateSH (V3 0 (-2) 20) . rotateSH a . upperBox Small Typical 2 $
reverse $
rectNSWE 10 0 (-2) 2
]
@@ -30,7 +29,7 @@ drawSwitch col1 col2 bt
defaultDrawButton :: Color -> Button -> SPic
defaultDrawButton col bt =
( translateSHz 15 . colorSH col $ upperPrismPoly 5 buttonGeometry
( translateSHz 15 . colorSH col $ upperBox Small Typical 5 buttonGeometry
, mempty
)
where