diff options
Diffstat (limited to 'silx/gui/plot3d/scene')
-rw-r--r-- | silx/gui/plot3d/scene/primitives.py | 10 | ||||
-rw-r--r-- | silx/gui/plot3d/scene/text.py | 4 | ||||
-rw-r--r-- | silx/gui/plot3d/scene/utils.py | 9 | ||||
-rw-r--r-- | silx/gui/plot3d/scene/viewport.py | 4 |
4 files changed, 11 insertions, 16 deletions
diff --git a/silx/gui/plot3d/scene/primitives.py b/silx/gui/plot3d/scene/primitives.py index abf7dd4..af00b6d 100644 --- a/silx/gui/plot3d/scene/primitives.py +++ b/silx/gui/plot3d/scene/primitives.py @@ -27,7 +27,7 @@ from __future__ import absolute_import, division, unicode_literals __authors__ = ["T. Vincent"] __license__ = "MIT" -__date__ = "25/07/2016" +__date__ = "24/04/2018" import collections @@ -38,7 +38,7 @@ import string import numpy -from silx.gui.plot.Colors import rgba +from silx.gui.colors import rgba from ... import _glutils from ..._glutils import gl @@ -1246,12 +1246,12 @@ class _Points(Geometry): $clippingCall(vCameraPosition); float alpha = alphaSymbol(gl_PointCoord, vSize); - if (alpha == 0.0) { - discard; - } gl_FragColor = $valueToColorCall(vValue); gl_FragColor.a *= alpha; + if (gl_FragColor.a == 0.0) { + discard; + } } """)) diff --git a/silx/gui/plot3d/scene/text.py b/silx/gui/plot3d/scene/text.py index 903fc21..c2983d5 100644 --- a/silx/gui/plot3d/scene/text.py +++ b/silx/gui/plot3d/scene/text.py @@ -28,13 +28,13 @@ from __future__ import absolute_import, division, unicode_literals __authors__ = ["T. Vincent"] __license__ = "MIT" -__date__ = "17/10/2016" +__date__ = "24/04/2018" import logging import numpy -from silx.gui.plot.Colors import rgba +from silx.gui.colors import rgba from ... import _glutils from ..._glutils import gl diff --git a/silx/gui/plot3d/scene/utils.py b/silx/gui/plot3d/scene/utils.py index 04abd04..3752289 100644 --- a/silx/gui/plot3d/scene/utils.py +++ b/silx/gui/plot3d/scene/utils.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2015-2017 European Synchrotron Radiation Facility +# Copyright (c) 2015-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -227,12 +227,7 @@ def trianglesNormal(positions): positions[:, 2] - positions[:, 0]) # Normalize normals - if numpy.version.version < '1.8.0': - # Debian 7 support: numpy.linalg.norm has no axis argument - norms = numpy.array(tuple(numpy.linalg.norm(vec) for vec in normals), - dtype=normals.dtype) - else: - norms = numpy.linalg.norm(normals, axis=1) + norms = numpy.linalg.norm(normals, axis=1) norms[norms == 0] = 1 return normals / norms.reshape(-1, 1) diff --git a/silx/gui/plot3d/scene/viewport.py b/silx/gui/plot3d/scene/viewport.py index 0cacbf0..41aa999 100644 --- a/silx/gui/plot3d/scene/viewport.py +++ b/silx/gui/plot3d/scene/viewport.py @@ -33,12 +33,12 @@ from __future__ import absolute_import, division, unicode_literals __authors__ = ["T. Vincent"] __license__ = "MIT" -__date__ = "25/07/2016" +__date__ = "24/04/2018" import numpy -from silx.gui.plot.Colors import rgba +from silx.gui.colors import rgba from ..._glutils import gl |