[Motmot] set_fullcanvas
Andrew Straw
astraw at caltech.edu
Tue May 4 14:42:27 UTC 2010
> Steve wrote:
>> Hello,
>>
>> I have a panel of size 400x400 that I am drawing some generated pixel
>> data (soon to be real data) on using the wxglvideo library. I am able
>> to generate 128 x 128 pixels using the numpy random call. When I
>> display it to my wx.Panel, it shows up fine, although very small. I
>> have tried to set the gl_canvas to full using the set_fullcanvas
>> (True) call but the size never changes. Any suggestions?
>>
>> Any help is appreciated.
>>
>> Thanks,
>>
>> Steve
>
> Hi Andrew,
>
> I have tried to get some information from the mail list but have yet to get a reply. I am really in a bind here trying to figure out why the motmot (DynamicImageCanvase) will not show up full screen on my application. I have a small test program that demonstrates the problem I am having (not being able to get the data to display on my entire panel). I have dug down into the wxglvideo code and hard coded sizes just to see if something I was doing was wrong but strange things happen. The GetClientSize gets the wrong size once inside the wxglvideo. I was hoping you could have a quick look at it. I would like to use this library as it seems to do exactly what I require but without help I may have to look at other ways to display my wavefront data.
>
> Attached is the small application. I am running python 2.6 (could be the problem?). Please reply if you don't have time so I can explore other solutions.
>
> Thanks for your help.
>
> - Steve
Hi Steve,
I found your problem. It actually had nothing to do with wxglvideo -- it
was simply a wxpython issue. You simply weren't creating an expanding
sizer that the DynamicImageCanvas was using. I am attaching your
original file and the fix. (Note that there is still a bug when turning
on/off the camera multiple times because the old canvas is not deleted.)
I hope this helps.
-Andrew
--
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: motmottest.py
Type: text/x-python
Size: 2449 bytes
Desc: not available
Url : http://code.astraw.com/pipermail/motmot/attachments/20100504/1345a01b/attachment.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: motmottest.patch
Type: text/x-patch
Size: 1130 bytes
Desc: not available
Url : http://code.astraw.com/pipermail/motmot/attachments/20100504/1345a01b/attachment.bin
More information about the Motmot
mailing list