Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!media01!pkr From: pkr@media01.UUCP (Peter Kriens) Newsgroups: comp.lang.smalltalk Subject: Re: optimising redraws of graphic panes in ST/V 286 Message-ID: <2038@media01.UUCP> Date: 18 Feb 91 21:08:39 GMT References: <1991Feb8.102528.10392@runx.oz.au> <3201.27b6a2ea@iccgcc.decnet.ab.com> Reply-To: pkr@media01.UUCP (Peter Kriens) Organization: aQute, Netherlands Lines: 46 > Dear netland, > > I've got a graphics application written in Smalltalk V/286. One > problem with it is that the screen redraws are a slow. I've > got a display of a X-Y plot with lots of lines/ text labels on it. > I've tried various ways to speed up the redraws. The manuals isn't exactly > helpful and so I include below a sample listing and ask the following > questions... > > - would you expect that writing to a virtual form, then copying > this to the display, would speed up the redraw? If yes, then > how is this done? I've tried every variant I can think of on > setting drawLine's pen's dest/sourceForm to Display/form etc., > etc. > - any other ideas on how to speed up the redraws on the following > sample system? > > There must be a way. The standard Smalltalk window redraws are > FASTTTT. What am I doing wrong? Unfortunately I did not see the original listing, only a reply. I could give you a few tips for speeding up general graphics. maybe you can use them. Only draw the parts that are needed. Clip the area which you know that is not changed. Draw on a bitmap and bitblit the resulting form on a redraw message. A lot of people dont know how the MVC mechanism should be used. Make a form of the largest size you are going to be using. Use this as a drawing area that is kept up to date. If you make changes that need to be shown on the screen say "self changed: #xxxx" where xxxx is the name of the graphpane. The message xxxx should then just return you form. If you have objects you show on the screen with text and graphics in it, use a form to represent these so that you don't have to rebuild this each time you redraw the screen. Buy a faster machine. If you want, you can send me your code and I can inspect it to see what is going on. Peter Kriens pkr@media01.uucp