Enhanced GLcanvas

Are you finding any problem in zoom, pan or picking?

Prashant

···

----- Original Message ----
From: Mathias Lorente mathias.lorente@insilicio.com
To: wxpython-users@lists.wxwidgets.org
Sent: Friday, 26 September, 2008 7:35:59 PM
Subject: Re: [wxpython-users] Enhanced GLcanvas

Yes, it is better with this version (no more exception) but the
rectangle has no color (black).
Mathias

Prashant Saxena wrote:

I am using PyOpenGL-3.0.0b6… Give a try.

Prashant

----- Original Message ----
From: Mathias Lorente mathias.lorente@insilicio.com
To: wxpython-users@lists.wxwidgets.org
Sent: Friday, 26 September, 2008 7:04:19 PM
Subject: Re: [wxpython-users] Enhanced GLcanvas

It should come from my version of pyopengl: 3.0.0b3 which fails
determining the size of the argument (tuple) into ListHandler.arraySize…

Mathias

Prashant Saxena wrote:

You can do one thing quickly if it’s private variables… Select entire
Rectangle class and replace “__” with nothing.

Prashant

----- Original Message ----
From: Mathias Lorente <mathias.lorente@insilicio.com
mailto:mathias.lorente@insilicio.com>
To: wxpython-users@lists.wxwidgets.org
mailto:wxpython-users@lists.wxwidgets.org
Sent: Friday, 26 September, 2008 6:35:45 PM
Subject: Re: [wxpython-users] Enhanced GLcanvas

Hum, it is a simple name mangling for “private” variables. But I still
do not why self.__color cannot be called from
self.__createDisplayList().

Mathias

Mathias Lorente wrote:

Hello,

I’ve just tried your demo with Python 2.5.2 and wxPython
2.8.6.1/2.8.8.1 but I get an error. With winpdb, I saw that while
initializing the rectangle, all variables (__xxx) are not created and
instead variables are created with the name _Rectangle__xx…
I really do not know where this comes from.
If you have any idea, while I’m trying to find out what happens…

Regards,
Mathias

Prashant Saxena wrote:

Hi,

I am trying to create an enhanced GLCanvas where you can create
custom shapes, auto picking, zoom, pan and etc. The first attempt is
here and it’s working fine at this stage. Right now you have only

‘Rectangle’ object to draw.

I would like to add wxPython events to these custom object that can
be drawn on canvas… Earlier I was thinking to add run time
methods to

instances but it’s
ugly and I am not sure if wxPython events can help me out here. If
“yes” then I would like to have a guide line for implementation.

1…Mouse wheel (zoom in-out)
2.Middle Drag (pan)
3. Left Down (pick)

Prashant


wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Download prohibited? No problem. CHAT from any browser, without download.

Well, I would say yes:
- You should take into account the position of the mouse for the zoom.
- If you combine pan and picking (+ move) you get a real strange behavior.

Regards,
Mathias

Prashant Saxena wrote:

···

Are you finding any problem in zoom, pan or picking?

Prashant

----- Original Message ----
From: Mathias Lorente <mathias.lorente@insilicio.com>
To: wxpython-users@lists.wxwidgets.org
Sent: Friday, 26 September, 2008 7:35:59 PM
Subject: Re: [wxpython-users] Enhanced GLcanvas

Yes, it is better with this version (no more exception) but the
rectangle has no color (black).
Mathias

Prashant Saxena wrote:
> I am using PyOpenGL-3.0.0b6.. Give a try.
>
> Prashant
>
> ----- Original Message ----
> From: Mathias Lorente <mathias.lorente@insilicio.com <mailto:mathias.lorente@insilicio.com>>
> To: wxpython-users@lists.wxwidgets.org <mailto:wxpython-users@lists.wxwidgets.org>
> Sent: Friday, 26 September, 2008 7:04:19 PM
> Subject: Re: [wxpython-users] Enhanced GLcanvas
>
> It should come from my version of pyopengl: 3.0.0b3 which fails
> determining the size of the argument (tuple) into ListHandler.arraySize...
>
> Mathias
>
> Prashant Saxena wrote:
> > You can do one thing quickly if it's private variables.. Select entire
> > Rectangle class and replace "__" with nothing.
> >
> > Prashant
> >
> > ----- Original Message ----
> > From: Mathias Lorente <mathias.lorente@insilicio.com <mailto:mathias.lorente@insilicio.com>
> <mailto:mathias.lorente@insilicio.com>>
> > To: wxpython-users@lists.wxwidgets.org <mailto:wxpython-users@lists.wxwidgets.org>
> <mailto:wxpython-users@lists.wxwidgets.org>
> > Sent: Friday, 26 September, 2008 6:35:45 PM
> > Subject: Re: [wxpython-users] Enhanced GLcanvas
> >
> > Hum, it is a simple name mangling for "private" variables. But I still
> > do not why self.__color cannot be called from
> self.__createDisplayList().
> >
> > Mathias
> >
> > Mathias Lorente wrote:
> > > Hello,
> > >
> > > I've just tried your demo with Python 2.5.2 and wxPython
> > > 2.8.6.1/2.8.8.1 but I get an error. With winpdb, I saw that while
> > > initializing the rectangle, all variables (__xxx) are not created and
> > > instead variables are created with the name _Rectangle__xx...
> > > I really do not know where this comes from.
> > > If you have any idea, while I'm trying to find out what happens..
> > >
> > > Regards,
> > > Mathias
> > >
> > > Prashant Saxena wrote:
> > >> Hi,
> > >>
> > >> I am trying to create an enhanced GLCanvas where you can create
> > >> custom shapes, auto picking, zoom, pan and etc. The first attempt is
> > >> here and it's working fine at this stage. Right now you have only
> > >> 'Rectangle' object to draw.
> > >>
> > >> I would like to add wxPython events to these custom object that can
> > >> be drawn on canvas.. Earlier I was thinking to add run time
> methods to
> > >> instances but it's
> > >> ugly and I am not sure if wxPython events can help me out here. If
> > >> "yes" then I would like to have a guide line for implementation.
> > >>
> > >> 1..Mouse wheel (zoom in-out)
> > >> 2.Middle Drag (pan)
> > >> 3. Left Down (pick)
> > >>
> > >> Prashant
> >