[squeak-dev] The Trunk: Graphics-dtl.105.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 12 05:10:12 UTC 2010


David T. Lewis uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-dtl.105.mcz

==================== Summary ====================

Name: Graphics-dtl.105
Author: dtl
Time: 12 February 2010, 12:08:03.834 am
UUID: d0fddc44-1946-413d-8408-d040e07a1bfb
Ancestors: Graphics-dtl.104

Remove dependency on MVC class Path in BitBlt class>>exampleOne.

=============== Diff against Graphics-dtl.104 ===============

Item was changed:
  ----- Method: BitBlt class>>exampleOne (in category 'examples') -----
  exampleOne
  	"This tests BitBlt by displaying the result of all sixteen combination rules that BitBlt is capable of using. (Please see the comment in BitBlt for the meaning of the combination rules). This only works at Display depth of 1. (Rule 15 does not work?)"
+ 	| pathClass path displayDepth |
- 	| path displayDepth |
  
  	displayDepth := Display depth.
  	Display newDepth: 1.
  
+ 	(Smalltalk hasClassNamed: #Path)
+ 		ifTrue: [pathClass := Smalltalk at: #Path]
+ 		ifFalse: [^self inform: 'MVC class Path not present in this image'].
+ 	path := pathClass new.
- 	path := Path new.
  	0 to: 3 do: [:i | 0 to: 3 do: [:j | path add: j * 100 @ (i * 75)]].
  	Display fillWhite.
  	path := path translateBy: 60 @ 40.
  	1 to: 16 do: [:index | BitBlt
  			exampleAt: (path at: index)
  			rule: index - 1
  			fillColor: nil].
  
  	[Sensor anyButtonPressed] whileFalse: [].
  	Display newDepth: displayDepth.
  
  	"BitBlt exampleOne"!




More information about the Squeak-dev mailing list