You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi !
As a beginner, I'm trying to understand luma.core, and I'm learning the various concepts and terminology used for GUI.
One thing suprised me: If I read the viewport's page on Wikipedia, it's not the same concept as I understand it in caroussel.py or crawl.py.
From wikipedia:
the viewport is the visible portion of a 2D area which is larger than the visualization device
But in caroussel.py, the viewport is larger than the visualization device.
Am I wrong ?
The text was updated successfully, but these errors were encountered:
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_inrange(2):
withcanvas(virtual) asdraw:
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.
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.
Hi !
As a beginner, I'm trying to understand luma.core, and I'm learning the various concepts and terminology used for GUI.
One thing suprised me: If I read the viewport's page on Wikipedia, it's not the same concept as I understand it in caroussel.py or crawl.py.
From wikipedia:
But in caroussel.py, the viewport is larger than the visualization device.
Am I wrong ?
The text was updated successfully, but these errors were encountered: