shikishima-TasakiLab
f13002b251
Add "GLTextItem" ( #1776 )
...
* Add GLTextItem
* Fixed DocString.
* Delete unnecessary function.
* Add `from .items.GLTextItem import *`
* Add an example.
* [Combines two `isinstance()` into one.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046120 )
* [Combines two `isinstance()` into one.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046120 )
* [The long code has been broken up into separate lines.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046234 )
* [Moved `pos`, `color`, `text`, and `font` to the `__init__` method.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633047216 )
* Add `import initExample` and fix `mkQApp().exec_()` to `pg.exec()` (https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046878 , https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046781 )
* Fix `pg.exec()` to `pg.mkQApp().exec()`
* Revert "Fix `pg.exec()` to `pg.mkQApp().exec()`"
This reverts commit 67d397d803
.
* Remove type-hints.
* Fix `glColor4d(float(self.color[0]), float(self.color[1]), float(self.color[2]), float(self.color[3]))` to `glColor4d(*self.color)`
* Add `value = fn.glColor(value)`
* Remove debug print.
* Add GLGridItem and GLAxisItem
* Remove if-check for "color" argument
* Draw text without using GLUT.
* Divide the text position by the device pixel ratio
* Fixed bare exceptions to ValueError and TypeError.
* Add 'GLTextItem.py' to utils.py.
* Fixed a bare exception to ArgumentErrror.
* Add `__all__ = ['GLTextItem']`
2021-06-05 08:19:54 -07:00
3DAlgoLab
28b1499f09
Force cameraPosition() to return Vector class. ( #1799 )
...
* Update GLViewWidget.py
Fix the wrong conversion of QVector3D to numpy array.
* new way to fix the conversion error
* Recover prev. version of pixelSize
Co-authored-by: Jaeyoon Jeong <diem389@gmail.com>
2021-06-01 22:21:50 -07:00
Wyatt Ubellacker
7e5c90a7a4
Fixing GLMeshItem memory leak in face drawing on 64-bit Linux ( #1783 )
2021-05-23 18:31:49 -07:00
Ogi Moore
6a708dc203
Merge pull request #1724 from j9ac9k/use-math-module-for-single-values
...
Use math module methods for scalars
2021-04-23 23:10:17 -07:00
Ogi Moore
03ea368454
Clean up Errors for CodeQL analyzer
...
CodeQL identified some errors and warnings, which this commit cleans up.
2021-04-23 22:44:29 -07:00
Ogi Moore
b0769f4be9
Use math.radians and math.degrees
...
Many places in the library were doing radian to degree conversion
via the manual calculation. Doing timeit benchmarks on my system, I
am able to get a 4x speedup by using math.degrees or math.radians
instead
2021-04-23 22:43:51 -07:00
Ogi Moore
1138c67d45
Use math module trig functions for scalars
...
This commit replaces the use of np.sin/np.cos/np.tan uses throughout
the library with math.sin/math.cos/math.tan for scalar values
2021-04-23 22:42:46 -07:00
Ogi Moore
c4a1cf11a1
Use clip_array or clip_scalar instead of np.clip
...
Significant performance issues have been identified with np.clip
and thus clip_array was created to speed up the operation. In addition
clip_scalar was created to clip a scalar value between two other values
this commit replaces many uses of np.clip from operating on scalars to
using clip_scalar instead
2021-04-23 11:53:00 -07:00
Ogi Moore
f8cefa6284
Use hypot method to avoid over/underflow errors
...
Use hypot instead of manual calculation
2021-04-23 11:53:00 -07:00
KIU Shueng Chuan
f4ed46773f
unify _dpiRatio() and devicePixelRatio()
2021-04-22 11:51:10 +08:00
Ogi Moore
ff71b6be6b
Add actual deprecation warnings
2021-02-11 21:34:02 -08:00
Kenneth Lyons
a1064345d3
Disable paint in GLScatterPlotItem if it has no data
2021-02-06 15:31:54 -08:00
Ogi Moore
309195ceea
Fix windows hidpi ( #1516 )
...
* set environment variables before starting QApp
* fix-422
* Better support of hidpi
* Fix Typo in App-Name
* Remove fontScaleFactor bits
* Add documenation for hidpi displays
* Fix pg not defined
2021-01-27 10:59:07 -08:00
Ogi Moore
85773e4530
Revert "have mkQApp configure QApplication such that it handles HIDPI displays on Windows ( #1509 )" ( #1515 )
...
This reverts commit 98f6b2f1a5
.
2021-01-27 10:42:38 -08:00
Ogi Moore
98f6b2f1a5
have mkQApp configure QApplication such that it handles HIDPI displays on Windows ( #1509 )
...
* set environment variables before starting QApp
* fix-422
* Better support of hidpi
* Fix Typo in App-Name
* Remove fontScaleFactor bits
* Add documenation for hidpi displays
2021-01-27 10:05:56 -08:00
KIU Shueng Chuan
13d652c794
convert to QPointF mouse event position
...
DockDrop.py : use QPointF mouse coords
2021-01-23 08:29:45 +08:00
Ogi Moore
4e070f40bc
Fixed typo
2021-01-21 08:48:54 -08:00
KIU Shueng Chuan
4f619bbb4c
update glinfo.py to use QOpenGLWidget
2021-01-15 08:25:09 +08:00
KIU Shueng Chuan
9145d7f24d
switch to usage of QOpenGLWidget
...
this drops support for Qt4
2021-01-15 08:25:09 +08:00
KIU Shueng Chuan
f863390409
change MidButton to MiddleButton
...
the former is no longer present in Qt 6 as an alias
2021-01-15 08:25:05 +08:00
Yoonyoung (Jamie) Cho
d8e4911fcd
Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization ( #909 )
...
* Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization
* fixed rotation name
* fixes extraneous pos argument and restore compatibility
* remove redundant getAxisAngle() in rotation (for Qt4 compatibility)
* GLViewWidget takes rotationMethod parameter
* Avoid merge conflict
* Fix docstring
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-12-24 21:45:02 -08:00
Allard Hendriksen
9d99a3e7b0
Fix incorrect rendering of overlapping object in renderToArray() ( #1306 )
...
This commit adds a depth buffer in renderToArray().
This fixes the issue that overlapping objects are rendered incorrectly
when using renderToArray() on a GLViewWidget.
This might be related to issue #743 .
2020-10-13 19:47:49 -07:00
Dominik Kutra
5842f42632
fix typo in documentation
...
found a tiny typo when reading the docs...
thank you guys for this awesome library 🚀
2020-09-29 17:29:52 +02:00
Ogi Moore
91ee83ab36
Merge pull request #402 from vladimir-kraus/develop
...
added method clear() to GLViewWidget
2020-06-22 20:58:04 -07:00
jeremysee2
f81768ac59
Issue #1260 : Added exception to checkOpenGLVersion to highlight OpenGL ES incompatibility on Raspberry Pi ( #1264 )
...
* checkOpenGLVersion exception for OpenGL ES
* checkOpenGLVersion exception
* checkOpenGLVersion exception
* python 2/3 compatibility
* Refactoring checkOpenGLVersion
Since the original goal of `checkOpenGLVersion` is to re-throw an exception or notify the user about a wrong OpenGL version in another exception, this commit unifies the two exception messages from `checkOpenGLVersion`.
Further, it corrects ">" to ">=" in the error message (originally my fault).
And it corrects verNumber to be an integer and not a boolean (there was a " < 2" too much at the end of the line).
Finally, since the opportunity was there, the method is further refactored, comments and a docstring are added.
Co-authored-by: 2xB <2xb@users.noreply.github.com>
2020-06-21 13:59:44 -07:00
Ogi Moore
b9a0fac815
devicePixelRatio is only accessible in __init__
2020-06-11 21:32:12 -07:00
Ogi Moore
308bb8d1ff
Merge branch 'master' into develop
2020-06-11 21:11:51 -07:00
Ogi Moore
8fce6c6ad8
Merge pull request #345 from fschill/develop
...
performance improvement of GLImageItem
2020-06-08 21:40:28 -07:00
Xinfa Joseph Zhu
660ac675f1
Fix typo bug
2020-01-09 15:23:49 -06:00
Kenneth Lyons
faef56c3e7
Qulogic py3 fixes ( #1073 )
...
* py3k: Remove reduce calls.
* py3k: Remove compatibility sortList function.
Sorting by key has existed since Python 2.4.
* Remove unnecessary sys.path manipulation.
This file doesn't have any __main__ code to run anyway.
* Use context manager
2019-11-12 08:45:42 -08:00
Aikhjarto
8c137a1caf
fix: circular texture was slightly off-center ( #1012 )
2019-09-13 22:12:23 -07:00
Elliott Sales de Andrade
2e90089890
Fix undefined reduce call.
2019-09-13 01:07:57 -04:00
Paul Debus
fd11e1352d
fix encoding error in checkOpenGLVersion ( #787 )
2019-08-18 12:16:31 -07:00
2xB
cd3f7fd68e
Adding setter for GLGridItem.color ( #992 )
...
* adding option to set grid color on demand
* Update after setColor
* Made GLGridItem color attribute private
* Init GLGridItem color with fn.Color
* Added docstring
2019-08-17 09:55:55 -07:00
2xB
652ae9e64a
Fix: GLScatterPlotItem and GLImageItem initializeGL only executed once
2019-08-15 02:41:51 +02:00
2xB
c37956b29a
Corrected documentation for heightColor shader
2019-06-28 01:51:20 +02:00
Ogi Moore
7506ee3d3f
Add mesa drivers to windows CI images and show openGL info during debug stage ( #954 )
...
Add mesa drivers to Windows CI Image
2019-06-23 23:03:51 -07:00
Ogi Moore
4a33f24582
Merge pull request #770 from cklb/develop
...
Fix issue #481 - `setCameraPosition` in `GLViewWiedget` ignored `pos` argument
2019-06-04 13:29:26 -07:00
Tran Duy Hoa
16616c77b7
Fix bug in GLViewWidget.py
...
call debug.printExc() instead of pyqtgraph.debug.printExc()
2018-10-26 23:06:23 +02:00
Stefan Ecklebe
fc5e0cd9f4
Fixed issue #481
2018-10-12 15:32:23 +02:00
Luke Campagnola
c20022580d
move panning code from mouse handler to pan()
2018-06-07 17:49:42 -07:00
Luke Campagnola
741e65c72e
Merge branch 'panning' of https://github.com/dvj/pyqtgraph into dvj-panning
2018-06-05 15:25:52 -07:00
Luke Campagnola
8a5c66f25e
Allow strings to specify color of GLLinePlot
2018-05-31 10:36:04 -07:00
kolt mcbride
e5079bca32
this import seems to be missing, I couldn't set color with out it for some reason
2018-05-24 22:06:27 -07:00
Luke Campagnola
66dcfc7c67
Merge branch 'develop' into pyside2
2018-05-22 15:22:54 -07:00
Doug Johnston
87efc2418a
fix whitespace changes
2018-04-26 09:17:00 -07:00
Doug Johnston
972f6205b5
Allow for panning in the plane of the camera
...
Accessed via <CTRL>-[left click]
2018-04-25 20:06:40 -07:00
Luke Campagnola
f8719c436a
Merge pull request #666 from feketeimre/fix
...
Fix issue #145
2018-04-25 16:17:07 -07:00
Luke Campagnola
063e9c91a9
Make high-dpi handling conditional on Qt version
2018-04-24 08:59:33 -07:00
Fekete Imre
ce704a1baa
Fix issue #145
...
Disable textures after painting is finished.
2018-04-13 16:23:41 +02:00