From 2c03f2902a51d6eac0d1dd3dd37c5167943b2af4 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Thu, 11 Jan 2018 11:51:36 -0600 Subject: [PATCH] don't throw away DImage transform Closes #306. --- src/Diagrams/TwoD/Image.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Diagrams/TwoD/Image.hs b/src/Diagrams/TwoD/Image.hs index 4d541740..c3902e89 100644 --- a/src/Diagrams/TwoD/Image.hs +++ b/src/Diagrams/TwoD/Image.hs @@ -94,15 +94,15 @@ instance Fractional n => HasOrigin (DImage n a) where image :: (TypeableFloat n, Typeable a, Renderable (DImage n a) b) => DImage n a -> QDiagram b V2 n Any image img - = mkQD (Prim img) + = transform tr + $ mkQD (Prim img) (getEnvelope r) (getTrace r) mempty (Query $ \p -> Any (isInsideEvenOdd r p)) where r = rectPath (fromIntegral w) (fromIntegral h) - -- should we use the transform here? - DImage _ w h _ = img + DImage _ w h tr = img rectPath :: RealFloat n => n -> n -> Path V2 n rectPath = rect