Skip to content

Commit

Permalink
Add WxWgpuCanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
gselzer committed Jan 17, 2025
1 parent 92f12f7 commit 6e6ed91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ndv/views/_pygfx/_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def sizeHint(self) -> QSize:
from wgpu.gui.jupyter import JupyterWgpuCanvas

Check warning on line 52 in src/ndv/views/_pygfx/_histogram.py

View check run for this annotation

Codecov / codecov/patch

src/ndv/views/_pygfx/_histogram.py#L50-L52

Added lines #L50 - L52 were not covered by tests

return JupyterWgpuCanvas
if frontend == GuiFrontend.WX:
from wgpu.gui.wx import WxWgpuCanvas

Check warning on line 56 in src/ndv/views/_pygfx/_histogram.py

View check run for this annotation

Codecov / codecov/patch

src/ndv/views/_pygfx/_histogram.py#L54-L56

Added lines #L54 - L56 were not covered by tests

return WxWgpuCanvas

Check warning on line 58 in src/ndv/views/_pygfx/_histogram.py

View check run for this annotation

Codecov / codecov/patch

src/ndv/views/_pygfx/_histogram.py#L58

Added line #L58 was not covered by tests

raise Exception(f"No canvas available for frontend {frontend}")

Check warning on line 60 in src/ndv/views/_pygfx/_histogram.py

View check run for this annotation

Codecov / codecov/patch

src/ndv/views/_pygfx/_histogram.py#L60

Added line #L60 was not covered by tests


class PyGFXHistogramCanvas(HistogramCanvas):

Check warning on line 63 in src/ndv/views/_pygfx/_histogram.py

View check run for this annotation

Codecov / codecov/patch

src/ndv/views/_pygfx/_histogram.py#L63

Added line #L63 was not covered by tests
Expand Down

0 comments on commit 6e6ed91

Please sign in to comment.