[squeak-dev] The Inbox: Graphics-tfel.306.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 12 15:31:20 UTC 2015

A new version of Graphics was added to project The Inbox:

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

Name: Graphics-tfel.306
Author: tfel
Time: 12 February 2015, 4:30:55.231 pm
UUID: d29337c1-4ded-b541-bf1e-9a8ca326eb04
Ancestors: Graphics-kfr.305

get rid of the self>>error: call in BitBlt>>copyBits. This is not really useful, as we can just proceed and it still works. In addition, the RSqueakVM needs to go through this fallback code to run the BitBltSimulation (it doesn't have a plugin)

=============== Diff against Graphics-kfr.305 ===============

Item was changed:
  ----- Method: BitBlt>>copyBits (in category 'copying') -----
  	"Primitive. Perform the movement of bits from the source form to the 
  	destination form. Fail if any variables are not of the right type (Integer, 
  	Float, or Form) or if the combination rule is not implemented. 
  	In addition to the original 16 combination rules, this BitBlt supports
  	16	fail (to simulate paint)
  	17	fail (to simulate mask)
  	18	sourceWord + destinationWord
  	19	sourceWord - destinationWord
  	20	rgbAdd: sourceWord with: destinationWord
  	21	rgbSub: sourceWord with: destinationWord
  	22	rgbDiff: sourceWord with: destinationWord
  	23	tallyIntoMap: destinationWord
  	24	alphaBlend: sourceWord with: destinationWord
  	25	pixPaint: sourceWord with: destinationWord
  	26	pixMask: sourceWord with: destinationWord
  	27	rgbMax: sourceWord with: destinationWord
  	28	rgbMin: sourceWord with: destinationWord
  	29	rgbMin: sourceWord bitInvert32 with: destinationWord
  	<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>
  	"Check for compressed source, destination or halftone forms"
  	(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:
  		["No alpha specified -- re-run with alpha = 1.0"
  		^ self copyBitsTranslucent: 255].
  	((sourceForm isForm) and: [sourceForm unhibernate])
  		ifTrue: [^ self copyBits].
  	((destForm isForm) and: [destForm unhibernate])
  		ifTrue: [^ self copyBits].
  	((halftoneForm isForm) and: [halftoneForm unhibernate])
  		ifTrue: [^ self copyBits].
  	"Check for unimplmented rules"
  	combinationRule = Form oldPaint ifTrue: [^ self paintBits].
  	combinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].
  	"Check if BitBlt doesn't support full color maps"
  	(colorMap notNil and:[colorMap isColormap]) ifTrue:[
  		colorMap := colorMap colors.
  		^self copyBits].
  	"Check if clipping gots us way out of range"
  	self clipRange ifTrue:[self roundVariables. ^self copyBitsAgain].
- 	self error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.
  	"Convert all numeric parameters to integers and try again."
  	self roundVariables.
  	^ self copyBitsAgain!

More information about the Squeak-dev mailing list