BitBlt >> #pixelAt:put: speed
Raab, Andreas
Andreas.Raab at disney.com
Tue May 2 23:39:57 UTC 2000
Yes - use a cache form for drawing the points directly and pass the entire
image to FormCanvas, ala:
"Create some random points"
rnd _ Random new.
points _ (1 to: 5000) collect:[:i| (rnd next @ rnd next * 400)
asIntegerPoint].
"Make us a canvas"
fc _ FormCanvas on: Display.
"Create a cached form for drawing all these points"
cacheForm _ Form extent: 400 at 400 depth: Display depth.
"Setup BB"
bb _ BitBlt toForm: cacheForm.
bb combinationRule: Form over.
bb width: 1; height: 1.
bb fillColor: Color red.
"Now draw these points offscreen"
points do:[:pt| bb destOrigin: pt; copyBits].
"And finally paint the entire image"
fc paintImage: cacheForm at: 0 at 0.
This should be a lot faster than anything else.
- Andreas
-----Original Message-----
From: Gerardo Richarte [mailto:core.lists.squeak at core-sdi.com]
Sent: Tuesday, May 02, 2000 6:20 PM
To: squeak at cs.uiuc.edu
Cc: recipient list not shown
Subject: Re: BitBlt >> #pixelAt:put: speed
Andres Valloud wrote:
> > Is there anything faster I can do? for example using Balloon somehow?
>
> Are you trying to do that directly on the World's canvas? Did you try to
> draw them in a buffer and then draw the buffer form?
Eh! Andres! (que haces? como va todo por ahi?)
I'm not sure what am I doing, I'm just drawing on the canvas I get as
argument
in Morph >> #drawOn:
So you think I should use an intermediate Canvas for this?
Thanks!
Liencistas Bye! (just for spanish speaking people, sorry)
Richie++
--
A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0
Investigacion y Desarrollo - CoreLabs - Core SDI
http://www.core-sdi.com <http://www.core-sdi.com>
--- For a personal reply use gera at core-sdi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000502/f65133f8/attachment.htm
More information about the Squeak-dev
mailing list
|