Skip to content

Add support of drawing text#3

Open
nvbn wants to merge 1 commit into
khenderick:masterfrom
nvbn:master
Open

Add support of drawing text#3
nvbn wants to merge 1 commit into
khenderick:masterfrom
nvbn:master

Conversation

@nvbn
Copy link
Copy Markdown

@nvbn nvbn commented Dec 20, 2014

Hi, I've ported support of drawing text from py-gaugette, usage:

display.draw_text(10, 10, 'Test text!')
display.display()

@khenderick
Copy link
Copy Markdown
Owner

Thanks for your contribution!

I just tested your code, but it looks like the x coordinate is off with 1 to the left. So if you specify display.draw_text(1, 0, "test") that it will start printing on x=0. If you specify x=0, then the first column of pixels will show on the outer right edge. Is this a small bug left, or intentional?

@nvbn nvbn force-pushed the master branch 2 times, most recently from de132f3 to f93b0b6 Compare December 28, 2014 21:56
@nvbn
Copy link
Copy Markdown
Author

nvbn commented Dec 28, 2014

Yes, there's been a bug.
Code from py-gaugette is a bit hackish and hard to maintain/understand (probably rewritten from C line-by-line), so I rewrote it. And now it's more pythonic and a lot simpler to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants