Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverted text #105

Merged
merged 6 commits into from
Jun 19, 2017
Merged

Inverted text #105

merged 6 commits into from
Jun 19, 2017

Conversation

BenScarb
Copy link
Contributor

@BenScarb BenScarb commented Apr 3, 2017

This will allow white text on a black background, when the invert parameter is set to True when adding text.
Also the WriteAll will now default to a partial update, unless specifically asked to do a full update as it's quicker that was (and looks better!)

This should allow white text on a black background, if the "invert" parameter is set to True.
Also updated WriteAll() to allow partial or full updates on the PaPiRus screen.  Partial updates for text being a lot quicker than a full one.
Added a third Positional Text example with the inverted text option being used
@shawaj
Copy link
Member

shawaj commented Apr 3, 2017

Awesome! That's amazing.

I wonder, if in future we could extend it to do inversion for pictures too...?

But not relevant for time being. We will test and merge this later in the week :-)

@shawaj shawaj mentioned this pull request Apr 3, 2017
@francesco-vannini
Copy link
Contributor

Hi Ben, thanks, I'll have a look ASAP. Just a consideration though. You are going for partial update by default but I am not sure it might be "frustration free" for beginners. Don't you think the logic should be reversed?

@BenScarb
Copy link
Contributor Author

BenScarb commented Apr 4, 2017

Probably a good idea, keeps the same functionality as it is currently with the ability to switch to partial updates as needed. I'll make the change.

Made so that partial updates can be called singly or setting "partial_update" on the instantiated class will make all "WriteAll()" calls be partial updates.
The whole class defaults to full updates.
Updated README.md with information about partial updates and how to activate them.
@BenScarb
Copy link
Contributor Author

BenScarb commented Apr 4, 2017

There we go, added some notes to the README.md as well, this time, without messing it up ;)

@francesco-vannini
Copy link
Contributor

francesco-vannini commented May 11, 2017

All good from my point of view. Could you just amend the papirus-write to add this new option?
Maybe rebase on #112 too if you can

@BenScarb
Copy link
Contributor Author

Sorry @francesco-vannini I totally missed this! I can add the option to papirus-write.
I'm a Mercurial man here, so I'm not sure about the rebasing thing, I'll have a read up, see what I can do (Not sure I've even done it in mercurial land!).

@francesco-vannini
Copy link
Contributor

francesco-vannini commented May 17, 2017

No worries @BenScarb do what you can and we'll try to work around that. Thanks
Mostly the current textpos.py has some conflict due to recent PRs which needs solving.

@francesco-vannini
Copy link
Contributor

Hey @BenScarb , any chance you could look into what we discussed?

@BenScarb
Copy link
Contributor Author

Right. merge conflicts sorted (I think, my Pi is playing up, I've done it without actual testing, my apologies)
I'll go take a look at papirus-write now :)

Added in the parameter to allow the inverting of text being displayed.
@BenScarb
Copy link
Contributor Author

Done. Sorry for taking so long to get this done, holiday in Turkey got in the way ;-)

@francesco-vannini
Copy link
Contributor

Thanks @BenScarb , testing this now.
Btw the README.md looks again as if it is all changed. This is because you must have edited the file on a Windows box:
file README.md
README.md: Python script, ASCII text executable, with very long lines, with CRLF line terminators

Just so that it's quicker, what are the parts that you have added/changed so that I can go ahead and amend the README before merge.

@francesco-vannini francesco-vannini merged commit 761462b into PiSupply:master Jun 19, 2017
@BenScarb
Copy link
Contributor Author

Erm! Let me go check...
I did the changes in SublimeText, which I thought preserved line termination... There goes that idea!
Time to get a Linux box working properly :) OK...

Added "The Positional Text API (example 3)" section
Added the following text to the notes for the positional text section:
"When using the PapirusTextPos, in either mode, setting the "partial_updates" property to True will cause partial updates to be done, meaning only the section of the PaPiRus screen that has been changed will be updated. These can be vastly quicker than a full update for each piece of text.

If not using the "partial_updates" property, calling "WriteAll(True)" will do the same thing on a one off basis."

I think that's all, at least that's what the diffing tool is telling me!

@francesco-vannini
Copy link
Contributor

Yeah, that's what I managed to find myself too. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants