Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKS: Wx support not compiled in #20

Open
rjsdotorg opened this issue Apr 29, 2020 · 1 comment
Open

GKS: Wx support not compiled in #20

rjsdotorg opened this issue Apr 29, 2020 · 1 comment

Comments

@rjsdotorg
Copy link

I just installed gr 1.13.0 via
pip install gr
with
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32

Also, in
https://github.com/sciapp/python-gr/blob/master/examples/wx_ex.py
I had to change for Python 3.8 map()
z = map(lambda x: x & 0xff, d)
to
z = list(map(lambda x: x & 0xff, d))
as init expects a list, and the first call to z on line 73 empties the generator.

I now just get
GKS: Wx support not compiled in
So, how to go about the wx build?

Our goal is to start a drop-in replacement for wx.lib.plot(), which is terribly slow for samples>~100k

@FlorianRhiem
Copy link
Member

Hello, sorry for the delayed reply.

wxWidgets support is built in on some platforms, but not currently in the Windows builds, Qt is the only GUI framework with support included in GR there. You can build GR yourself, either by cross compiling or by using cmake, but you will have to provide the wxWidgets libraries and headers, and set up the compilation of wxplugin yourself there.

What I would recommend instead is to use the memory output from GR to create a 32-bit RGBA image in memory, create a wxImage from that and display the image (possibly by converting it to a wxBitmap first and then calling wxDC::drawBitmap). That way you will not need wxWidgets support in GR and it should still be quite fast. To get memory output, you have to use gr_beginprint() with a string containing the desired resolution and a pointer to memory. For more information, see the memory output documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants