[Pkg] The Trunk: Graphics-mt.520.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 8 12:50:07 UTC 2022


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

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

Name: Graphics-mt.520
Author: mt
Time: 8 June 2022, 2:50:00.935335 pm
UUID: 8fb5feb3-71e4-1240-8c76-b10b119a18e2
Ancestors: Graphics-mt.519

Fixes a rounding issue with fractional points in integer rectangles.

=============== Diff against Graphics-mt.519 ===============

Item was changed:
  ----- Method: Rectangle>>pointAtFraction: (in category 'rectangle functions') -----
  pointAtFraction: relativePoint
+ 	"For values between 0.0 and 1.0, answers a point that lies within the receiver.
+ 	This method is a more general form of #center (meaning 0.5 at 0.5), #topLeft
+ 	(meaning 0.0 at 0.0), #bottomCenter (meaning 0.5 at 1.0), etc.
+ 	NOTE THAT for proportions that equal 1.0, the resulting point will NOT lie
+ 	within the receiver, i.e., #containsPoint: will answer false."
+ 	
- 
  	| result |
  	result := self origin + (self extent * relativePoint).
  	^ self isIntegerRectangle
+ 		ifTrue: [result floor]
- 		ifTrue: [result rounded]
  		ifFalse: [result]!



More information about the Packages mailing list