added a method to add text to the top of the code#9
Open
i164j9 wants to merge 4 commits intodelimitry:masterfrom
Open
added a method to add text to the top of the code#9i164j9 wants to merge 4 commits intodelimitry:masterfrom
i164j9 wants to merge 4 commits intodelimitry:masterfrom
Conversation
added a font file from: https://fonts.google.com/specimen/Roboto+Flex?query=Roboto changed main() to give the option to have text or not by changing commented lines text is only added when there is a font file specified renamed sample aztec code and added a second sample
delimitry
reviewed
Apr 11, 2023
| """ | ||
|
|
||
| def __init__(self, data, size=None, compact=None): | ||
| def __init__(self, data, fontfile=None, size=None, compact=None): |
Owner
There was a problem hiding this comment.
Please add fontfile to docstring.
aztec_code_generator.py
Outdated
| (x * module_size, y * module_size, | ||
| x * module_size + module_size, y * module_size + module_size), | ||
| fill=(0, 0, 0) if self.matrix[y][x] == '#' else (255, 255, 255)) | ||
| if self.my_font != None: |
aztec_code_generator.py
Outdated
| data_cw_count = self.__add_data(self.data) | ||
| self.__add_mode_info(data_cw_count) | ||
|
|
||
| def add_text(self, img_obj, text, module_size = 4): |
Owner
There was a problem hiding this comment.
Please format the code and add arguments to docstring.
README.md
Outdated
Comment on lines
13
to
14
| #to add text: | ||
| aztec_code = AztecCode(data,fontfile='path/to/your/font.ttf') |
Owner
There was a problem hiding this comment.
Please format this lines according to pep8.
fixed docstring fixed line 600 - if self.my_font is not None: fixed formatting in README.md
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.
added a font file from: https://fonts.google.com/specimen/Roboto+Flex?query=Roboto
changed main() to give the option to have text or not by changing commented lines
text is only added when there is a font file specified
renamed sample Aztec code and added a second sample