[squeak-dev] The Trunk: ST80-mt.211.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 9 14:38:26 UTC 2016


Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.211.mcz

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

Name: ST80-mt.211
Author: mt
Time: 9 May 2016, 4:38:16.550999 pm
UUID: 34bab149-f6f2-194f-b1ba-5695b06e143b
Ancestors: ST80-mt.210

Fixes font rendering in pop-up menus. Also removes the hack that forced black text on white background. Now, the example at the end of the method works again.

Note that the crappy font rendering was due to an issue with bitmapped fonts at the moment. We cannot check whether a StrikeFont has nice AA in its glyphs.

=============== Diff against ST80-mt.210 ===============

Item was changed:
  ----- Method: Paragraph>>asForm (in category 'converting') -----
  asForm
  	"Answer a Form made up of the bits that represent the receiver's displayable text."
+ 
+ 	| theForm |
+ 	theForm := (Form extent: compositionRectangle extent depth: Display depth)
- 	| theForm oldBackColor oldForeColor |
- 	textStyle isTTCStyle ifTrue: [
- 		theForm :=  (Form extent: compositionRectangle extent depth: 32)
  		offset: offset.
+ 
- 	] ifFalse: [
- 		theForm := (ColorForm extent: compositionRectangle extent)
- 			offset: offset;
- 			colors: (Array
- 				with: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])
- 				with: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).
- 	].
- 	oldBackColor := backColor.
- 	oldForeColor := foreColor.
- 	backColor := Color white.
- 	foreColor := Color black.
  	self displayOn: theForm
  		at: 0 at 0
  		clippingBox: theForm boundingBox
  		rule: Form over
  		fillColor: nil.
+ 
- 	backColor := oldBackColor.
- 	foreColor := oldForeColor.
  	^ theForm
  
  "Example:
  | p |
  p := 'Abc' asParagraph.
  p foregroundColor: Color red backgroundColor: Color black.
  p asForm displayOn: Display at: 30 at 30 rule: Form over"
  !



More information about the Squeak-dev mailing list