[squeak-dev] The Trunk: Graphics-topa.301.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Sep 16 15:17:21 UTC 2014


Tobias Pape uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-topa.301.mcz

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

Name: Graphics-topa.301
Author: topa
Time: 16 September 2014, 5:16:44.215 pm
UUID: a66aac86-031b-4db4-97ce-e33376745f9e
Ancestors: Graphics-mt.300

Fix Mantis 5711
	http://bugs.squeak.org/view.php?id=5711
after 7 years...

=============== Diff against Graphics-mt.300 ===============

Item was changed:
  ----- Method: TextComposer>>composeLinesFrom:to:delta:into:priorLines:atY:textStyle:text:container:wantsColumnBreaks: (in category 'as yet unclassified') -----
  composeLinesFrom: argStart to: argStop delta: argDelta into: argLinesCollection priorLines: argPriorLines atY: argStartY textStyle: argTextStyle text: argText container: argContainer wantsColumnBreaks: argWantsColumnBreaks
  
  	wantsColumnBreaks := argWantsColumnBreaks.
  	lines := argLinesCollection.
  	theTextStyle := argTextStyle.
  	theText := argText.
  	theContainer := argContainer.
  	deltaCharIndex := argDelta.
  	currCharIndex := startCharIndex := argStart.
  	stopCharIndex := argStop.
  	prevLines := argPriorLines.
  	currentY := argStartY.
  	maxRightX := theContainer left.
  	possibleSlide := stopCharIndex < theText size and: [theContainer isMemberOf: Rectangle].
  	nowSliding := false.
  	prevIndex := 1.
  	"choose an appropriate scanner - should go away soon, when they can be unified"
  	scanner := CompositionScanner new.
  	scanner text: theText textStyle: theTextStyle.
  	scanner wantsColumnBreaks: wantsColumnBreaks.
  	defaultLineHeight := scanner computeDefaultLineHeight.
  	isFirstLine := true.
  	self composeAllLines.
  	isFirstLine ifTrue: ["No space in container or empty text"
  		self 
  			addNullLineWithIndex: startCharIndex
+ 			andRectangle: (theContainer left @ theContainer top extent: 0 at defaultLineHeight)
- 			andRectangle: (theContainer topLeft extent: 0 at defaultLineHeight)
  	] ifFalse: [
  		(lines last last = theText size and: [scanner doesTheLineBreaksAfterLastChar])
  			ifTrue: [self addNullLineForIndex: theText size + 1]
  	].
  	^{lines asArray. maxRightX}
  !



More information about the Squeak-dev mailing list