Repository navigation
Refactor annotation color handling and add unit tests - #6214
Merged
Merged
Conversation
Collaborator
There was a problem hiding this comment.
Nit: How about using new UintArray(3) here instead?
Collaborator
Author
There was a problem hiding this comment.
This has been changed in the new commit so we do not even need this anymore.
timvandermeij
force-pushed
the
annotation-color
branch
from
July 15, 2015 16:52
de424d5 to
a2e9845
Compare
Collaborator
Author
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 |
Collaborator
Author
|
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Windows)SuccessTotal script time: 18.30 mins
|
From: Bot.io (Linux)SuccessTotal script time: 19.54 mins
|
Snuffleupagus
added a commit
that referenced
this pull request
Jul 16, 2015
Refactor annotation color handling and add unit tests
Collaborator
|
Looks good, thanks! |
1 task
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.
This PR has the following goals:
setColormethod should have according to the specification at https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf#page=607&zoom=auto,-246,289.setColormethod on an annotation as described by the unit tests. Note that this also adds support for grayscale and CMYK color spaces (previously a TODO) practically for free.setColor.setColortakes care of color space conversion and color array preparation (as RGB), so we do not need to convert anything in the display layer anymore.This rewrite automatically fixes an issue in the old code where transparency (here with
color = null) would not be interpreted correctly and it would draw as black instead.@Snuffleupagus Could you review this? It is a fairly easy patch and half of it are unit tests. http://tug.ctan.org/tex-archive/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf is a good document to verify that the colors are still the same before and after the patch (see page 6).