Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Pythonic way for size/color/layout properties assignation/access #16

Closed
renoust opened this issue Sep 7, 2017 · 2 comments
Closed

Pythonic way for size/color/layout properties assignation/access #16

renoust opened this issue Sep 7, 2017 · 2 comments

Comments

@renoust
Copy link

renoust commented Sep 7, 2017

The idea is to be able to assign tuples/lists to these types of properties.

@anlambert
Copy link
Contributor

Hi Benjamin,

Nice idea, I should have think of it earlier. I just pushed some changes (see ba94a25) that enables to assign tuples and lists to color / layout / size property. So now, you can write for instance:

graph['viewColor'][n] = [r, g, b]
graph['viewColor'][n] = (r, g, b, a)

graph['viewLayout'][n] = (x, y)
graph['viewLayout'][n] = [x, y, z]

graph['viewSize'][n] = [w, h]
graph['viewSize'][n] = (w, h, d)

Regarding the property access, a Tulip type (aka tlp.Color, tlp.Coord and tlp.Size) will still be returned. Nevertheless, those types are iterable so if you want to get a pure Python list for a property value, you can write:

color = list(viewColor[n])
pos = list(viewLayout[n])
size = list(viewSize[n])

Cheers!

@renoust
Copy link
Author

renoust commented Sep 8, 2017

So fast! Thanks!

bpinaud referenced this issue Jan 29, 2019
TravisCI: Migrate Linux builds from trusty to xenial
p-mary referenced this issue in anlambert/talipot Jan 3, 2020
QOpenGL module is marked as deprecated since a while now so it is time
to remove its use from the Talipot codebase and promote the use of
QOpenGL* classes directly integrated in the QtGui module.

The big difference between QOpenGL and QtOpenGL from Qt5 is that all
rendering is performed in framebuffer objects, there is no more direct
rendering in the underlying os windows with its own OpenGL context.

Talipot OpenGL rendering also follows that idiom, all renderings are performed
offscreen using a shared OpenGL context. This also means that there is no
more QGLWidget as viewport for QGraphicsView. Talipot OpenGL scene are
now converted to QImage in order to display them using the default Qt raster
rendering engine. This should fixes the numerous rendering glitches observed
on MacOS.

First thing observed after the migration is a consequent performance boost
in OpenGL rendering when using an Intel GPU on a Linux host machine (especially
when selecting elements, it is now 10 times faster on debian stable).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants