Please use this thread for feedback related to PyS60 1.9.7 release.
Please use this thread for feedback related to PyS60 1.9.7 release.
Pankaj Nathani
www.croozeus.com
Hi !
I have some questions regarding the new feature:
My strategy is based on double screen buffer (some parts omitted):Two new APIs are added to canvas - begin_redraw and end_redraw. These can be used to instruct the window server to enable redraw drawing on the canvas UI control.
The problem here is related to concurrent call to stats_canvas_redraw() since we did not have a way to signalize that a redrawing was in progress. We could have calls from canvas API and from my own app. Making intersection minimum (just a blit) seemed to reduce/eliminate this problem.Code:class MyCanvas: def __init__(): self.scr_buf = graphics.Image.new((x,y)) self.body = Canvas(redraw_callback = self.stats_canvas_redraw,...) #... def stats_canvas_redraw(self,rect=None): # called from canvas, when necessary. # Just a blit since I am using a double buffer strategy via self.scr_buf self.body.blit(self.scr_buf) def stats_buffer_redraw(self,rect=None): # called from my app, when necessary self.scr_buf.clear((255,255,255)) # any drawing stuff here # ... self.stats_canvas_redraw()
So, the idea behind begin_redraw and end_redraw is just to solve this problem ?
I changed the code to something like:
This way, is the concurrent call to redraw eliminated ?Code:def stats_buffer_redraw(self,rect=None): self.body.begin_redraw() self.scr_buf.clear((255,255,255)) # any drawing stuff here # ... self.stats_canvas_redraw() self.body.end_redraw()
Last edited by marcelobarrosalmeida; 2009-08-05 at 17:53.
Hi
In XM5800, when I try to use the camera, rotation events are not properly handled. I mean, if I rotate the phone, image received in callback function is not rotated. Moreover, the image is smaller than canvas (documentation states that The default size is the same as the application's main pane size).
Problems or some misunderstanding ?
It seems related to the following issue: http://discussion.forum.nokia.com/fo...t=start_finderCode:import appuifw import camera import graphics appuifw.app.directional_pad = False def cb(im): appuifw.app.body.blit(im) appuifw.app.body=appuifw.Canvas() camera.start_finder(cb)
I'm afraid this does not solve _that_ problem.
If you look at the documentation(3.1.10) -
In the "stats_buffer_redraw" method, by adding the begin_redraw and end_redraw you are telling the window server to discard all the old drawing operations it cached the last time this method was called. If you are only updating a portion of the screen then you can specify that rect in the begin_redraw function. This way the window server will only bother about redrawing that rect and not the whole window.The window server caches drawing operations in the redraw store. Delimiting drawing with begin_redraw()/end_redraw() allows window server to efficiently manage drawing operations.
If applications perform drawing operations outside begin_redraw/end_redraw, window server cannot cull drawing operations from its cache of drawing operations, because it cannot know whether a set of drawing operations has been superceded by a new set. In this scenario every frame of drawing that is done on a non-redraw drawing window will become slower and slower as it draws all the drawing operations for the entire history of the window (well actually up until the last begin_redraw/end_redraw for the whole window).
If an application performs begin_redraw/end_redraw, it tells the window server that it can throw away any old drawing operations it had for the area of the window specified in the redraw, thus allowing for more optimal management of drawing operations.
If you take a look at Scribble we are only updating a few pixels every time a touch event occurs. So we pass the rect surrounding the line/point drawn and the window server will only update that area and in addition it will not cache the draw operations. Without the begin/end redraw there was an exponential performance degradation as the canvas(window server) updates increased.
import antigravity
installing python runtime is fine. installing 1.9.7_unsigned_devcert (after signing) messes up my phonerandom apps disappear from my menu!! aaand, the shell dies in interactive mode
![]()
i'm going back to 1.9.5 ...
The86Hitman
PyS60 1.9.7 on E71
http://www.drhtailor.com/pys60
The86Hitman
PyS60 1.9.7 on E71
http://www.drhtailor.com/pys60
I had my key bindings disabled after using begin_redraw() and end_redraw(). I had some bindings related to navi keys but they stopped to work after a redraw with begin_redraw() and end_redraw() (like in fist post in this thread).
Do I understand correctly that PyS60 1.9.7 documentation is available ONLY online? That there is no offline, local, on my harddisk documentation available at all?
Major defect, if that is the case.
First you drop PDF, now local HTML files.. Won't dare to think what next
Cheers,
--jouni desperately searching for docs, soon going to install wget![]()
![]()
![]()
hello all
have any body tried installing the unsigned scriptshell after signing it through a devcert or symbian signed successfully.![]()
Gargi Das- http://gargidas.blogsot.com
Forum Nokia Python Wiki
Learn Python at http://mobapps.org/PyS60
hello the86Hitman
i am also unable to install the unsigned version after signing it.
am i missing something??
thanks
Gargi Das- http://gargidas.blogsot.com
Forum Nokia Python Wiki
Learn Python at http://mobapps.org/PyS60
Pankaj Nathani
www.croozeus.com
Pankaj Nathani
www.croozeus.com