Comments (3)
Viewport as defined in wikipedia is correct, of course. In luma.core, if you treat viewport
as a class then, in the conventional sense, yes i think it is mixing the terminology up.
If you take a snippet as follows:
virtual = viewport(device, width=device.width, height=768)
for _ in range(2):
with canvas(virtual) as draw:
draw.text((0, 0), "A long time ago", fill="white")
draw.text((0, 12), "in a galaxy far", fill="white")
draw.text((0, 24), "far away....", fill="white")
I read this as "create a virtual device with a viewport onto the device, sized as ...".
Strictly speaking virtual
is an instance of the viewport
class, so I absolutely see where you're coming from, but it had never really occurred to me to read the code with that inflection before.
from luma.core.
Ok
If I'm the only one understanding viewport this way, it's not a problem.
from luma.core.
No no, it's good that you're picking stuff up like this. If we can make the documentation and the code clearer as a result, then it's better for everyone who comes to subsequently use it. Have a think how it could be changed to be consistent with the wikipedia definition.
from luma.core.
Related Issues (20)
- add test for SPI cs_high warning
- Reduce the build jobs on Travis ... or use Github Actions HOT 6
- Possible to use diff-algorithm with linux_framebuffer device? HOT 8
- Add docs for last luma.core that supports Python 2.7
- luma.core.device.device is missing in api documentation HOT 1
- Supporting 32-bit depth for linux_framebuffer HOT 2
- Use github actions to publish to pypi HOT 5
- Configure setup() using setup.cfg file
- IndexError: Font does not have ASCII code: 8211 (or 8212,8217,8220,8221) HOT 2
- VFD support in Luma HOT 9
- Crash @ Raspi3 install with "syntax error" ... already tried with Python 3.8.4 HOT 5
- Support for Orange Pi GPIO module HOT 4
- How do proper cleanup/release resources when using luma.core?
- Unnecessary delete statement in function (identified with LGTM.com) HOT 3
- remove deprecated cmdline.make_serial
- ftdi_spi doesn't appear to support chips with more than 8 GPIO's HOT 8
- Drop support for Python 3.6 HOT 1
- namespace_packages parameter is deprecated
- Pillow 10 deprecation warnings
- Array is incorrectly shifted for 96x16 OLEDs. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luma.core.