[Pharo-project] drawString: aString from: firstIndex to: lastIndex at: aPoint font: fontOrNil color: c

Stéphane Ducasse stephane.ducasse at inria.fr
Wed Feb 9 14:44:29 CET 2011


PharoCanvas>>drawString: aString from: firstIndex to: lastIndex at: aPoint font: fontOrNil color: c
	| font |
	port colorMap: nil.
	font := fontOrNil ifNil: [TextStyle defaultFont].
	port combinationRule: Form paint.
	font installOn: port
		foregroundColor: (self shadowColor ifNil:[c]) 
		backgroundColor: Color transparent.
	font displayString: aString on: port 
		from: firstIndex to: lastIndex at: (origin + aPoint) kern: 0.



SMxCanvas>>drawString: aString from: firstIndex to: lastIndex at: aPoint font: fontOrNil color: c
	| font |
	port colorMap: nil.
	font := fontOrNil ifNil: [StrikeFont default].
	font installOn: port foregroundColor: (self shadowColor ifNil:[c]) backgroundColor: nil.
	font displayString: aString on: port 
		from: firstIndex to: lastIndex at: (origin + aPoint) kern: font baseKern negated.


I was wondering why the combinationRule is not needed.

Stef



More information about the Pharo-project mailing list