Enhanced GLcanvas

If you combine pan and picking (+ move) you get a real strange behavior.
Could you please explain this strange behavior?

Mouse based zoom will be implemented later.

Prashant

···

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

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
mailto:mathias.lorente@insilicio.com>>
To: wxpython-users@lists.wxwidgets.org
mailto: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)

  1. Left Down (pick)

Prashant


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


Connect with friends all over the world. Get Yahoo! India Messenger.

Prashant Saxena wrote:

>If you combine pan and picking (+ move) you get a real strange behavior.
Could you please explain this strange behavior?

For example:
- launch you Demo application,
- left-click on the rectangle and drag it from the left side to the right side of the window,
- move it back to the left side using middle-button,
- then if you click on the rectangle, it is not picked (nothing printed in the console) but if you click on its previous position (right side) you pick it!
...
Unless something does not work properly on my side (my rectangle is still black)...

Mathias

···

Mouse based zoom will be implemented later.

Prashant

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

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 <mailto:mathias.lorente@insilicio.com>>
> To: wxpython-users@lists.wxwidgets.org <mailto: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>
> <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 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>
> > <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>
> > <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
> > >