Skip to content

Commit

Permalink
fix: Default to black fill color for shapes in animations (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst committed Nov 22, 2023
2 parents fe81466 + 97bb08b commit 4a105b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion primer/src/Primer/Primitives.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ import Diagrams.Backend.Rasterific (
import Diagrams.Prelude (
Diagram,
V2 (..),
black,
circle,
deg,
fillColor,
lineWidth,
mkP2,
mkSizeSpec,
recommendFillColor,
rect,
rectEnvelope,
renderDia,
Expand Down Expand Up @@ -402,7 +404,7 @@ primFunDef def args = case def of
Con _ c [x] | c == cSucc -> succ <$> exprToNat x
_ -> Nothing
exprToDiagram e =
exprToPicture e <&> fix \f -> \case
exprToPicture e <&> recommendFillColor black . fix \f -> \case
Circle r ->
if r == 0 -- `diagrams` crashes with a divide-by-zero if we don't catch this case
then mempty
Expand Down

1 comment on commit 4a105b7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Primer benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 4a105b7 Previous: fe81466 Ratio
evalTestM/discard logs/mapEven 1: outlier variance 0.07165553796947537 outlier variance 0.024983563445101907 outlier variance 2.87
typecheck/mapOdd 10: outlier variance 0.5889772302541672 outlier variance 0.018175582990397694 outlier variance 32.40

This comment was automatically generated by workflow using github-action-benchmark.

CC: @dhess

Please sign in to comment.