Scott Talbert
e49de63539
Fix more OGL float/int conversion issues
...
Fixes: https://github.com/wxWidgets/Phoenix/issues/2739
2025-07-31 09:56:27 -04:00
Lorenzo Nebolosi
ef42749294
float -> int
...
DrawRectangle and DrawRoundedRectangle requires ints instead of floats
2024-11-19 17:22:00 +01:00
mprosperi
1d2eb2e39d
fix float->int compatibility for py3.10+ (also fixes #2349 )
2023-05-31 15:39:33 +02:00
Robin Dunn
d9725119d7
Merge pull request #2039 from swt2c/pygauge_py3.10
...
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
2021-12-13 20:54:44 -08:00
Scott Talbert
173d079681
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
...
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision. This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets. There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.
Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.
This is an example of the relevant exception:
Traceback (most recent call last):
File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
r.width = w
TypeError: 'float' object cannot be interpreted as an integer
Fixes #2038 .
[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Christian Clauss
25ba122168
Fix typos discovered by codespell
2021-08-07 18:55:49 +02:00
Robin Dunn
732ff6752b
Revert "Spelling fixes in wx.lib"
...
This reverts commit c00b8950da .
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Metallicow
542a32c17d
Optimize Colour Brush Pen
...
Use builtin Colours, Brushes, Pens where needed. They are faster.
2020-07-19 23:48:39 -05:00
Robin Dunn
c00b8950da
Spelling fixes in wx.lib
2020-07-14 12:53:31 -07:00
Robin Dunn
705aa63d75
Merge branch 'more-windowidref' into wxPy-4.0.x
...
(cherry picked from commit ada7b2fc51 )
2018-06-25 19:12:00 -07:00
Robin Dunn
b1b0c9e297
wx.NewId() --> wx.ID_ANY or wx.Window.NewControlId() as appropriate
2018-06-19 10:31:56 -07:00
Jakub Wilk
3a34b71d9a
Don't use string exceptions
...
String exceptions have been removed in Python 2.6.
Attempting to raise them causes TypeError.
2018-02-18 21:19:54 +01:00
Robin Dunn
beec04eacd
PrepareDC for the wx.MemoryDCs too
2017-12-28 16:08:50 -08:00
Robin Dunn
7e8a27e170
Clean up access to the Canvas's buffer bitmap
2017-12-28 15:59:04 -08:00
Robin Dunn
c7c2de0a1b
It looks like Overlay use was started but never fully implemented. Remove it all for now.
2017-12-28 15:55:39 -08:00
Robin Dunn
583549098a
Also PrepareDC for the wx.ClientDC's used for intermediate drawing
2017-12-28 15:42:34 -08:00
Metallicow
eb3653ee27
Trim Whitespace ogl directory
2016-10-12 22:42:30 -05:00
Robin Dunn
1d1fc7c187
More docstring ref fixes in wx.lib
2016-07-07 09:58:04 -07:00
Robin Dunn
cc3190e240
Lots more docstring refs fixed
2016-07-06 20:20:10 -07:00
Robin Dunn
4175d35105
Fix docstring references to wx.Colour
2016-07-06 18:40:04 -07:00
Werner F Bruhin
2461989aa8
- added 'documented' flag, also could still do with some editing
2015-02-05 11:23:44 +01:00
Werner F Bruhin
f081eb9ba7
- remove -#!/usr/bin/env python
2015-02-05 11:08:10 +01:00
Werner F Bruhin
9bade03362
- documentation corrections
2014-06-17 13:18:14 +02:00
Werner F Bruhin
77bf699847
- documentation
2014-06-17 12:16:52 +02:00
Werner F Bruhin
2a13b7cf98
- Typo found by PyLint
2014-06-14 15:13:06 +02:00
Werner F Bruhin
afb1a4554b
- remove debug print stuff and better text for DCOverlay use
2014-06-13 12:04:18 +02:00
Werner F Bruhin
d8d05d6f6c
- some more print to help debug
...
- correct typo
2014-06-13 10:33:54 +02:00
Werner F Bruhin
d7ff82a064
- do not clear DCOverlay, caused the issue of moved objects showing on old pos
2014-06-13 09:27:19 +02:00
Werner F Bruhin
b3017a497b
- use MemoryDC instead of ClientDC
...
- use DCOverlay for outline drawing when moving
2014-06-12 20:23:45 +02:00
Werner F Bruhin
4eadf6b3b2
- rename to get rid of '_' in file name
2014-06-12 15:51:01 +02:00