@@ -54,6 +54,7 @@ module Graphics.Dynamic.Plot.R2 (
5454 , dynamicAxes , noDynamicAxes
5555 -- ** Plot type
5656 , DynamicPlottable
57+ , tweakPrerendered
5758 -- ** Legacy
5859 , PlainGraphics (.. )
5960 ) where
@@ -502,10 +503,10 @@ instance Plottable (ConvexSet (R,R)) where
502503 plot EmptyConvex = mempty
503504 plot (ConvexSet hull intersects)
504505 = plot [ plot intersects
505- & tweakDiagram (Dia. opacity
506+ & tweakPrerendered (Dia. opacity
506507 (1 / fromIntegral (length intersects)) )
507508 , plot hull
508- & tweakDiagram ( Dia. lwO 3
509+ & tweakPrerendered ( Dia. lwO 3
509510 >>> Dia. opacity 1
510511 >>> Dia. fcA (Dia. withOpacity Dia. grey 0.01 ) ) ]
511512
@@ -1226,12 +1227,12 @@ autoDashLine w p q = simpleLine' (max 1 w) p q
12261227 & if w < 1 then Dia. dashingO [w* 6 , 3 ] 0 else id
12271228
12281229
1229- tweakDiagram :: (PlainGraphicsR2 -> PlainGraphicsR2 ) -> DynamicPlottable -> DynamicPlottable
1230- tweakDiagram f = dynamicPlot %~ (tweak . )
1230+ tweakPrerendered :: (PlainGraphicsR2 -> PlainGraphicsR2 ) -> DynamicPlottable -> DynamicPlottable
1231+ tweakPrerendered f = dynamicPlot %~ (tweak . )
12311232 where tweak = getPlot %~ f
12321233
12331234opacityFactor :: Double -> DynamicPlottable -> DynamicPlottable
1234- opacityFactor = tweakDiagram . Dia. opacity
1235+ opacityFactor = tweakPrerendered . Dia. opacity
12351236
12361237
12371238-- | When you “plot” 'xInterval' / 'yInterval', it is ensured that the (initial) view encompasses
0 commit comments