PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

Inverted text #105

Closed BenScarb closed 7 years ago

BenScarb commented 7 years ago

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!)

shawaj commented 7 years ago

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 :-)

francesco-vannini commented 7 years ago

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 commented 7 years ago

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.

BenScarb commented 7 years ago

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

francesco-vannini commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

BenScarb commented 7 years ago

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 :)

BenScarb commented 7 years ago

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

francesco-vannini commented 7 years ago

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.

BenScarb commented 7 years ago

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 commented 7 years ago

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