Attached a demo app that demonstrates some basic dynamic image
manipulations. It’s not meant to be a replacement for Adobe Flash, but
the wx demos have no dynamic image examples.
I’d like some people to alpha test this on various platforms,
especially non-MSW ones.
I’d appreciate any efforts to get this to work properly and
consistently on non-MSW platforms as all demo apps should. I expect
this to open a “can of worms” regarding compatibility issues. All input
is welcome.
My development platform:
Platform Windows 6.1.7600 {Win7 64-bit running Python and wxPython
32-bit versions}
Python Python 2.6.5 (r265 :79096, Mar 19 2010, 21 :48 :26) [MSC
v.1500 32 bit (Intel)]
Python wx 2.8.11.0 { wxImage.Rotate() is broken in this version; must
use Pil }
##################################################################################3
Platform Linux
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3]
Wx 2.8.10.1
Pil 1.1.7
Keyboard “hot keys”:
<Esc> Quit the app.
INSERT Toggle whether to show the image.
DELETE Toggle whether to crop the image when rotating it.
HOME Toggle whether to enable rotation.
END Reverse the rotation direction.
PAGEUP Toggle whether to ramp or freeze the current overall transparency.
PAGEDOWN Reverse the transparency change ramp direction.
LEFT Flip the image horizontally.
RIGHT Flip the image vertically.
NUMPAD_HOME Reset image angle and opacity to 0.0, 100%.
INSERT : Toggling whether to show the image.
DELETE : Toggling whether to crop the image when rotating it.
DELETE : Toggling whether to crop the image when rotating it.
PAGEUP : Toggling whether to change the transparency.
PAGEDOWN : Reversing the direction of transparency change.
HOME : Toggling whether to enable rotation.
END : Reversing the rotation direction.
LEFT: Flipping the image vertically.
LEFT: Flipping the image horizontally.
DOWN: Reseting opacity to 0%.
UP: Reseting opacity to 100%.
DOWN: Reseting opacity to 0%.
DOWN: Reseting opacity to 0%.
LEFT: Flipping the image vertically.
LEFT: Flipping the image horizontally.
Attached a demo app that demonstrates some basic dynamic image
manipulations. It’s not meant to be a replacement for Adobe Flash, but
the wx demos have no dynamic image examples.
I’d like some people to alpha test this on various platforms,
especially non-MSW ones.
I’d appreciate any efforts to get this to work properly and
consistently on non-MSW platforms as all demo apps should. I expect
this to open a “can of worms” regarding compatibility issues. All input
is welcome.
My development platform:
Platform Windows 6.1.7600 {Win7 64-bit running Python and wxPython
32-bit versions}
Python Python 2.6.5 (r265 :79096, Mar 19 2010, 21 :48 :26) [MSC
v.1500 32 bit (Intel)]
Python wx 2.8.11.0 { wxImage.Rotate() is broken in this version; must
use Pil }
Did you see an image or did a black square appear when you first
pressed <Insert> ?? Does the image start/stop rotating when you
pressed <Home> ? Does the image fade then reappear regularly when you
press <Page Up> ?
···
On Jun 30, 3:25 pm, Carlos Frederico Bastarz <fredericor...@gmail.com> wrote:
<Esc> Quit the app\.
INSERT Toggle whether to show the image\.
DELETE Toggle whether to crop the image when rotating it\.
HOME Toggle whether to enable rotation\.
END Reverse the rotation direction\.
PAGEUP Toggle whether to ramp or freeze the current overall
transparency.
PAGEDOWN Reverse the transparency change ramp direction\.
LEFT Flip the image horizontally\.
RIGHT Flip the image vertically\.
NUMPAD\_HOME Reset image angle and opacity to 0\.0, 100%\.
INSERT : Toggling whether to show the image.
DELETE : Toggling whether to crop the image when rotating it.
DELETE : Toggling whether to crop the image when rotating it.
PAGEUP : Toggling whether to change the transparency.
PAGEDOWN : Reversing the direction of transparency change.
HOME : Toggling whether to enable rotation.
END : Reversing the rotation direction.
LEFT: Flipping the image vertically.
LEFT: Flipping the image horizontally.
DOWN: Reseting opacity to 0%.
UP: Reseting opacity to 100%.
DOWN: Reseting opacity to 0%.
DOWN: Reseting opacity to 0%.
LEFT: Flipping the image vertically.
LEFT: Flipping the image horizontally.
##################################################################################
2010/6/30 Ray Pasco <pas...@verizon.net>
> Attached a demo app that demonstrates some basic dynamic image
> manipulations. It's not meant to be a replacement for Adobe Flash, but the
> wx demos have no dynamic image examples.
> I'd like some people to alpha test this on various platforms, especially
> non-MSW ones.
> I'd appreciate any efforts to get this to work properly and consistently on
> non-MSW platforms as all demo apps should. I expect this to open a "can of
> worms" regarding compatibility issues. All input is welcome.
> My development platform:
> Platform Windows 6.1.7600 {Win7 64-bit running Python and wxPython 32-bit
> versions}
> Python Python 2.6.5 (r265 :79096, Mar 19 2010, 21 :48 :26) [MSC
> v.1500 32 bit (Intel)]
> Python wx 2.8.11.0 { wxImage.Rotate() is broken in this version; must use
> Pil }
> Pil 1.1.7
> Thanks in Advance,
> Ray Pasco
> pascor(at)verizon(dot)net
> --
> To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com<wxPython-users%2Bunsubscribe@googlegroups.com>
> or visithttp://groups.google.com/group/wxPython-users?hl=en
--
Carlos Frederico Bastarz
Centro de Previsão de Tempo e Estudos Climáticos - CPTEC/INPE
Brasil
------------------------------------------------
carlos.freder...@cptec.inpe.br
fredericor...@gmail.com
Oh, sorry! It seems that everything is working properly, i see the image rotating, fading, increasing, decreasing and the crop works also. The insert button function works, i.e, it inserts an image; The home button play/pause the rotating image and the image appears nicely without flickering.
On Ubuntu 9.10, Kernel 2.6.31-22, wxpython 2.8.9.10, python 2.6.4
there is some extreme flickering going on as the window rotates.
other than that it all seems fine
It's very flickery on a Mac, and my keyboard does not have an Insert key so I had to tweak it to use a different key. The flicker is probably coming from the fact that you only use wx.ClientDC for drawing instead of catching the EVT_PAINT event and using a wx.PaintDC there.
Apple's CoreGraphics system has optimized drawing to the display by implementing a "display pipeline" where, in a nutshell, multiple tasks can be in different stages of drawing to the screen at the same time. When you use a wx.ClientDC it has to interrupt this pipeline in order to immediately move the pixels to the screen, and all the things that were in the pipeline before have to restart. So heavy use of wx.ClientDC for anything other than things like measuring text will be very inefficient and will slow things down.
Doing your drawing in a EVT_PAINT handler on the other hand will ensure that your app stays in harmony with the display pipeline and will do things in the proper order. Instead of doing immediate draws with a client DC whenever it needs to update the display, just change the state of your app as needed (or perhaps update a buffer bitmap) and do a Refresh. That will add your request to the display pipeline and when it's your turn you'll get the paint event where you can safely put pixels on the screen, and everybody is happy. The good news is that this approach also works very well on the other platforms.
···
On 6/30/10 12:17 PM, Ray Pasco wrote:
Attached a demo app that demonstrates some basic dynamic image
manipulations. It's not meant to be a replacement for Adobe Flash, but
the wx demos have no dynamic image examples.
I'd like some people to alpha test this on various platforms, especially
non-MSW ones.
I'd appreciate any efforts to get this to work properly and consistently
on non-MSW platforms as all demo apps should. I expect this to open a
"can of worms" regarding compatibility issues. All input is welcome.
althought u didnt want windows users ... works ok on XP, used all the
keys and all of them work like they "should".
when i log on my ubuntu ill check it also.
good work
···
On 1 jul, 18:00, Robin Dunn <ro...@alldunn.com> wrote:
On 6/30/10 12:17 PM, Ray Pasco wrote:
> Attached a demo app that demonstrates some basic dynamic image
> manipulations. It's not meant to be a replacement for Adobe Flash, but
> the wx demos have no dynamic image examples.
> I'd like some people to alpha test this on various platforms, especially
> non-MSW ones.
> I'd appreciate any efforts to get this to work properly and consistently
> on non-MSW platforms as all demo apps should. I expect this to open a
> "can of worms" regarding compatibility issues. All input is welcome.
It's very flickery on a Mac, and my keyboard does not have an Insert key
so I had to tweak it to use a different key. The flicker is probably
coming from the fact that you only use wx.ClientDC for drawing instead
of catching the EVT_PAINT event and using a wx.PaintDC there.
Apple's CoreGraphics system has optimized drawing to the display by
implementing a "display pipeline" where, in a nutshell, multiple tasks
can be in different stages of drawing to the screen at the same time.
When you use a wx.ClientDC it has to interrupt this pipeline in order to
immediately move the pixels to the screen, and all the things that were
in the pipeline before have to restart. So heavy use of wx.ClientDC for
anything other than things like measuring text will be very inefficient
and will slow things down.
Doing your drawing in a EVT_PAINT handler on the other hand will ensure
that your app stays in harmony with the display pipeline and will do
things in the proper order. Instead of doing immediate draws with a
client DC whenever it needs to update the display, just change the state
of your app as needed (or perhaps update a buffer bitmap) and do a
Refresh. That will add your request to the display pipeline and when
it's your turn you'll get the paint event where you can safely put
pixels on the screen, and everybody is happy. The good news is that
this approach also works very well on the other platforms.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org