Merged
Conversation
These two renderer properties were being skipped by the fill method, even though they affect text rendering. Fixes processing#1320
Contributor
Author
|
Note: I've realized I forgot to add my new test file to test.html, so they don't actually run - and when I did add them they don't work yet. Fixing now... |
Adds the new unit test file to the test index files so that they run. Instead of checking that particular properties are preserved by push/pop, run a deepEqual check against the render state before and after each of the operations that push is documented to preserve. This should have a better chance of catching future subtle breaks to push/pop behavior. Verified that the new tests actually catch the problem with _strokeSet and _fillSet that I was originally trying to fix.
Contributor
Author
|
That's better! The tests actually run now 😨 and I replaced the very invasive/targeted tests I had with a more thorough approach that does a deep comparison of the render state before and after using push/pop to undo a particular operation. I added a test for every operation that's supposedly supported, according to the documentation on |
Member
|
right on, thank you! |
islemaster
added a commit
to islemaster/p5.play
that referenced
this pull request
Apr 29, 2016
Previously at 0.4.21. No other changes to code obviously required; tests still pass. 0.4.24 includes [this bugfix](processing/p5.js#1321) which should resolve issue quinton-ashley#54 with Sprite.debug drawing. See 0.4.24 release notes here: https://github.com/processing/p5.js/releases/tag/0.4.24
3 tasks
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.
Fixes #1320
Make
p5.prototype.push()track the_strokeSetand_fillSetproperties which can impact text rendering. Adds a simple test to show that these properties are now saved and restored to their original state by push/pop.