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

clipTo function #35

Closed
fryguybob opened this issue Aug 4, 2012 · 2 comments
Closed

clipTo function #35

fryguybob opened this issue Aug 4, 2012 · 2 comments

Comments

@fryguybob
Copy link
Member

(Imported from http://code.google.com/p/diagrams/issues/detail?id=76. Original issue from byor...@gmail.com on March 15, 2012, 12:17:22 AM UTC)

Diagrams.TwoD.Path defines a function

clipBy :: (HasStyle a, V a ~ R2) => Path R2 -> a -> a

which applies a clipping path attribute to a diagram, but does not alter its envelope. We should also define a function 'clipTo' which does 'clipBy' and also clips the diagram's envelope. This should be possible, but is not entirely straightforward since it requires taking a pointwise minimum of the two envelopes, whereas the monoid instance for Envelope uses a pointwise maximum. But it should not be too hard to take a look at how the actual Monoid instance for Envelope is implemented, and imitate it.

@bergey
Copy link
Member

bergey commented Feb 13, 2014

This is satisfied by #144, right? @jeffreyrosenbluth @byorgey

@byorgey
Copy link
Member

byorgey commented Feb 13, 2014

Yep!

@byorgey byorgey closed this as completed Feb 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants