Open
Conversation
|
I tried this but without success: I don't have any stroke colors (using type:none and setting any stroke color) , and also it changes the "circle" behavior: there is no padding around the text anymore :-/ Edit: about the stroke not visible it's because you set the lineWidth to a hardcoded value, not depending on the width of the size of the font (which seems to depend on the size of the canvas, which depends on the original size of the icon file). For example if the icon file is 512*512, it works for me with the line width set to 30 (in fact I tried with this formula which kinda worked for many sizes: |
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.
Refactors badge drawing functions (removing duplicate lines)
Adds a "none" type (no background shape)
Adds a stroke color options (sort of outline around the text, see http://stackoverflow.com/questions/14126298/create-text-outline-on-canvas-in-javascript)