Render circles as ellipses, allows for proper scaling

This commit is contained in:
jgk
2021-03-10 04:09:18 +01:00
parent cc86a701db
commit f729e5a298
2 changed files with 6 additions and 6 deletions
+1 -5
View File
@@ -1033,11 +1033,7 @@ moveFlame rotd w pt =
$ scale scaleChange 1
-- $ color white
-- $ circleSolid 5
-- $ pictures $ reverse [color white $ circleSolid 4
$ pictures $ reverse
[color red $ ellipseSolid (-2,0) (2,0) 6
--,color white $ ellipseSolid (2,0) (-2,0) 6
--,color white $ ellipseSolid (2,0) (-2,0) 6
$ pictures $ reverse [color white $ circleSolid 4
,color (withAlpha 0.5 white) $ circleSolid 5
]
-- $ rotate (radToDeg (fromIntegral time * 10))
+5 -1
View File
@@ -166,7 +166,11 @@ picToLTree mx (PolygonCol i vs)
in LLeaf $ RenderPoly $ zip (map zeroZ $ polyToTris ps) $ polyToTris cs
| otherwise = LBranches []
picToLTree mx (Circle i r)
| Just i == mx || Nothing == mx = LLeaf $ RenderCirc $ ((0,0,0),black,r)
| Just i == mx || Nothing == mx = LLeaf $ RenderEllipse
[((-r, r,0), black)
,((-r,-r,0), black)
,(( r,-r,0), black)
]
| otherwise = LBranches []
picToLTree mx (Ellipse i (ax,ay) (bx,by) r)
| Just i == mx || Nothing == mx = LLeaf $ RenderEllipse [((ax,ay+r,0),black)