-
Notifications
You must be signed in to change notification settings - Fork 62
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
Image #173
Conversation
|
||
makeLenses ''Image | ||
-- | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add a comment here.
-- | An image primitive. | ||
data DImage :: * -> * where | ||
DImage :: ImageData t -> Int -> Int -> T2 -> DImage t | ||
-- ^ width, height, applied transformation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dist/build/tmp-7144/src/Diagrams/TwoD/Image.hs:62:3:
parse error on input `-- ^ width, height, applied transformation'
Maybe you have to put this comment above DImage
, using -- |
?
-- | Make a file path into a 'Diagram', i.e a primitive of type 'DImage External'. | ||
-- This function calls @uncheckedImageRef@ and provides no guarantee that | ||
-- the image file exists. | ||
mkImageRef :: Renderable (DImage External) b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you say about simply getting rid of this function? Its name is uninformative, we don't particularly want to encourage its use, and it's just a simple composition of two other functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine with me.
This can be merged, I'm sure there is more to do but I have implemented the API
form #29 and checked it in cairo and rasterific.
Note
Image
has been renamedDImage
- easier to work with Juicy Pixels, without constantlyqualifying imports.