[etoys-dev] Etoys: Graphics-kfr.8.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Oct 23 16:02:14 EDT 2011


Karl Ramberg uploaded a new version of Graphics to project Etoys:
http://source.squeak.org/etoys/Graphics-kfr.8.mcz

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

Name: Graphics-kfr.8
Author: kfr
Time: 23 October 2011, 10:01:46 pm
UUID: 7b668dbc-8e13-a143-812a-0bec8b0f15c5
Ancestors: Graphics-kfr.7

Revert method to old version. Impossible to detect transparency the way I tought.

=============== Diff against Graphics-kfr.7 ===============

Item was changed:
  ----- Method: AnimatedGIFReadWriter>>allImages (in category 'accessing') -----
  allImages
+ 	| body colorTable |
- 	| body colorTable newColors |
  	stream class == ReadWriteStream ifFalse: [
  		stream binary.
  		self on: (ReadWriteStream with: (stream contentsOfEntireFile))].
+ 	localColorTable := nil.
+ 	forms := OrderedCollection new.
+ 	delays := OrderedCollection new.
+ 	comments := OrderedCollection new.
- 	localColorTable _ nil.
- 	forms _ OrderedCollection new.
- 	delays _ OrderedCollection new.
- 	comments _ OrderedCollection new.
  	self readHeader.
  	[(body _ self readBody) == nil]
+ 		whileFalse: [colorTable := localColorTable
- 		whileFalse: [colorTable _ localColorTable
  						ifNil: [colorPalette].
  			transparentIndex
  				ifNotNil: [transparentIndex + 1 > colorTable size
  						ifTrue: [colorTable := colorTable forceTo: transparentIndex + 1 paddingWith: Color white].
  					colorTable at: transparentIndex + 1 put: Color transparent].
+ 			body colors: colorTable.
- 		newColors := Array new: (1 bitShift: body depth).
- 		1 to: newColors size do: [:i |
- 		i <= colorTable size
- 			ifTrue: [newColors at: i put: (colorTable at: i)]
- 			ifFalse: [newColors at: i put: Color black]].
- 			body colors: newColors. 
  			forms add: body.
  			delays add: delay].
  	^ forms!



More information about the etoys-dev mailing list