Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New scaleInvPrim function #71

Merged
merged 9 commits into from
Apr 17, 2013
Prev Previous commit
Next Next commit
further clarify intention of scale-invariant primitives
  • Loading branch information
Brent Yorgey committed Jan 25, 2013
commit 8ac02defa8f054c28483067add107e6d392a5b41
5 changes: 4 additions & 1 deletion src/Diagrams/TwoD/Transform.hs
Original file line number Diff line number Diff line change
@@ -317,7 +317,10 @@ instance (Renderable t b, V t ~ R2) => Renderable (ScaleInv t) b where
-- will have an /empty/ envelope, trace, and query. The reason is
-- that the envelope, trace, and query cannot be cached---applying a
-- transformation would cause the cached envelope, etc. to get "out
-- of sync" with the scale-invariant object.
-- of sync" with the scale-invariant object. The intention, at any
-- rate, is that scale-invariant things will be used only as
-- "decorations" (/e.g./ arrowheads) which should not affect the
-- envelope, trace, and query.
scaleInvPrim :: (Transformable t, Renderable t b, V t ~ R2, Monoid m)
=> t -> R2 -> QDiagram b R2 m
scaleInvPrim t d = mkQD (Prim $ scaleInv t d) mempty mempty mempty mempty