[CANTOO] Re: A new default look for Squeak, revisited

Bob Arning arning at charm.net
Sun Jul 2 14:36:59 UTC 2000


On Sun, 02 Jul 2000 12:05:12 +0200 Henrik Gedenryd <Henrik.Gedenryd at lucs.lu.se> wrote:
>or as in Explorer 5 (Mac), a
>"blur" filter (when the URL field pops down suggested matches for what you
>type). I like the last, but BitBlt can't do that 

Well, the enclosed snippet looks close to my eye. Could be faster with a specialized BitBlt rule, but isn't that always the case?
 
>(it would require JITBlt,
>and what a great demo of it that it would be! In fact, when I think of it, I
>want that _now_! Imagine the cool popup windows.).

Cheers,
Bob

===== code follows =====
'From Squeak2.9alpha of 13 June 2000 [latest update: #2440] on 2 July 2000 at 10:25:21 am'!
"Change Set:		BlurMorph
Date:			2 July 2000
Author:			Bob Arning

BlurMorph provides a blurred view of whatever is behind it ala Internet Explorer 5. To see an example

	BlurMorph test"!

Morph subclass: #BlurMorph
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Morphic-Effects'!

!BlurMorph commentStamp: 'RAA 7/2/2000 10:23' prior: 0!
BlurMorph provides a blurred view of whatever is behind it ala Internet Explorer 5. To see an example

	BlurMorph test!

!BlurMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/2/2000 10:19'!
areasRemainingToFill: aRectangle

	^ Array with: aRectangle! !

!BlurMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/2/2000 10:17'!
drawOn: aCanvas

	| f blt |
	f _ Form extent: self extent depth: 32.
	f fillColor: color.
	blt _ BitBlt 
		destForm: f 
		sourceForm: aCanvas form 
		fillColor: nil 
		combinationRule: 30 
		destOrigin: 0 at 0 
		sourceOrigin: bounds origin 
		extent: self extent 
		clipRect: f boundingBox.
	{0 at 0},(0 at 0) eightNeighbors do: [ :pt |
		blt 
			destOrigin: pt;
			copyBitsTranslucent: 6.
	].
	aCanvas
		paintImage: f
		at: bounds origin
! !

!BlurMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/2/2000 09:49'!
hasTranslucentColor

	^true! !

!BlurMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/2/2000 10:21'!
initialize

	super initialize.
	color _ Color white.! !


!BlurMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 7/2/2000 10:24'!
test
"
BlurMorph test
"
	| blur text |

	blur _ self new.
	text _ TextMorph new 
		contents: 'This is an example of text drawn over a BlurMorph to simulate the effect seen in Explorer 5'
		wrappedTo: 100.
	blur extent: 300 at 200.
	blur addMorph: (text position: 20 at 20; lock).
	blur openInWorld.! !





More information about the Squeak-dev mailing list