473,382 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Canvas drawing slow

I'm mapping quadratic equations on a Canvas.
But that's irrelevant, the point is I am drawing
a lot of points in a loop without returning to
mainloop until the end. I want my students to see the
drawing progress, so I call update_idletasks() after
each tiny rectangle. ( I use to call update() and it
seems to make no difference)

This is so fast at first I am tempted to put a sleep(.01) in the
loop. But after a few thousand points it starts to slow down
dramatically. WHy? I thought udate_idletasks would only redraw
the 'damaged' portion.
Maybe my approach is wrong.

I was hoping to use Canvas to do some simple instructional
animation, but not if I can't solve this mystery.

Any help appreciated.
BTW: I posted a couple days ago about rotating objects making
the item stack grow. My bad, debugging bug, fixed it.

Jul 19 '05 #1
0 1144

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary Richardson | last post by:
I've been working on a Python version of Andreas Weber's ASCII schematic drawing program ( http://www.tech-chat.de) ; not that I thought I could do it better but just as a programming exercise....
2
by: billy | last post by:
I'm working on a sort of paint program that has the usual canvas pane in the middle of the main form. I'm working on that class and have a couple quick questions.. actually more like I'm looking...
0
by: the dark lord | last post by:
Greetings I wish someone can offer me some suggestions to optimize my code: I have a drawing surface and I wanted to create a pair of rulers for it like in popular image editing programs like...
5
by: Andrew Poulos | last post by:
Is there a right/best way to draw an ellipse using Canvas? (With VML there's the v:oval element which makes the exercise trivial). I tried drawing a 360 degree arc (a circle) and then scaling it...
0
by: aaronwmail-usenet | last post by:
Announcing SkimpyGimpy Support for PNG image CAPTCHA generation and PNG canvases. You can now use SkimpyGimpy to generate CAPTCHA text representations as PNG image files in addition to...
3
by: frikk | last post by:
Hey everyone. I have been working with python for a couple years now, but just recently built my first program with a GUI. I decided to start with Tkinter since it is included with the base...
2
by: psychofish25 | last post by:
I was trying to figure out how I could just put a canvas onto a Tkinter form and draw stuff on it. Could someone please tell me the code for creating a canvas and drawing a blue circle on it? ...
10
by: blaine | last post by:
Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is...
7
by: MartinRinehart | last post by:
In the bit of code posted below, I get a 256x128 canvas, sized via CSS. Then I write a color wash, same dimensions. Problem: wash is about 10% smaller than the canvas. Results identical, FF on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.