From 05d1dcd331fafd5de3c171a8feb2db7da05ea51e Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Tue, 30 Oct 2012 02:03:09 -0700 Subject: [PATCH] Add NullBackend for Ellipsoid --- src/Diagrams/ThreeD/Shapes.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Diagrams/ThreeD/Shapes.hs b/src/Diagrams/ThreeD/Shapes.hs index 70c21fee..8042f237 100644 --- a/src/Diagrams/ThreeD/Shapes.hs +++ b/src/Diagrams/ThreeD/Shapes.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TypeFamilies , FlexibleContexts + , MultiParamTypeClasses , ViewPatterns #-} ----------------------------------------------------------------------------- @@ -38,6 +39,9 @@ type instance V Ellipsoid = R3 instance Transformable Ellipsoid where transform t1 (Ellipsoid t2) = Ellipsoid (t1 <> t2) +instance Renderable Ellipsoid NullBackend where + render _ _ = mempty + sphere :: (Backend b R3, Renderable Ellipsoid b) => Diagram b R3 sphere = mkQD (Prim $ Ellipsoid mempty) (mkEnvelope sphereEnv)