Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.212.mcz==================== Summary ====================
Name: ST80-mt.212
Author: mt
Time: 9 May 2016, 5:09:09.023554 pm
UUID: ffa77d99-631e-bc4b-a739-fd4326b8140e
Ancestors: ST80-mt.211
For the sake of documentation, recover the resource-optimized version of rendering paragraphs into forms.
=============== Diff against ST80-mt.211 ===============
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 := textStyle maxDepth = 1
+ ifTrue: [
+ (ColorForm extent: compositionRectangle extent)
+ offset: offset;
+ colors: {
+ backColor ifNil: [Color transparent].
+ foreColor ifNil: [Color black]}]
+ ifFalse: [
+ (Form extent: compositionRectangle extent depth: Display depth)
+ offset: offset].
- theForm := (Form extent: compositionRectangle extent depth: Display depth)
- offset: offset.
self displayOn: theForm
at: 0@0
clippingBox: theForm boundingBox
rule: Form over
fillColor: nil.
^ theForm
"Example:
| p |
p := 'Abc' asParagraph.
p foregroundColor: Color red backgroundColor: Color black.
p asForm displayOn: Display at: 30@30 rule: Form over"
!