Bring bitmap% get-argb-pixels type in line with documentation/implementation#954
Draft
bdeket wants to merge 1 commit intoracket:masterfrom
Draft
Bring bitmap% get-argb-pixels type in line with documentation/implementation#954bdeket wants to merge 1 commit intoracket:masterfrom
bdeket wants to merge 1 commit intoracket:masterfrom
Conversation
samth
reviewed
Jul 29, 2020
Member
samth
left a comment
There was a problem hiding this comment.
I'm a little worried about breaking existing code here.
| (init [bitmap (Option (Instance Bitmap%))]) | ||
| [get-argb-pixels | ||
| (->* [Real Real Exact-Nonnegative-Integer Exact-Nonnegative-Integer Bytes] | ||
| (->* [Exact-Nonnegative-Integer Exact-Nonnegative-Integer Exact-Nonnegative-Integer Bytes] |
Member
There was a problem hiding this comment.
Did this intentionally remove an argument?
Contributor
Author
|
no, I removed the argument by mistake :( The function works fine with negative integers, so I could use Integer instead of Exact-Nonnegative-Integer?
In the end it turned out that my real problem is that the type for Bitmap% in racket/draw and images/flomap don't match. And this is PR is not solving this... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sending real values for x and y to bitmap get-argb-pixels exits with an error
(for example)
Note that get/set are not mirrored (set does allow real x and y according to the doc)
looking at racket/draw/bitmap it seems that x and y could be Integer (ie neg. values allowed) but since the docs say otherwise I will stick with this for now