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

commits at source.squeak.org commits at source.squeak.org
Tue Apr 13 12:17:45 UTC 2021


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

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

Name: Graphics-mt.447
Author: mt
Time: 13 April 2021, 2:17:38.592381 pm
UUID: 297ae9ef-ec22-b340-b60d-2639c8765aa4
Ancestors: Graphics-mt.446, Graphics-ct.437, Graphics-ct.419

Merges Graphics-ct.437, Graphics-ct.419 -- which complements Graphics-cbc.372

(Note that I think it makes sense to either let #isIntegerRectangle always decide on rounding or introduce an IntegerRectangle as proposed by Eliot some time ago. Rectangles are usually immutable anyway. http://forum.world.st/The-Inbox-Graphics-cbc-372-mcz-tp4940274p4940451.html)

=============== Diff against Graphics-mt.446 ===============

Item was added:
+ ----- Method: Point>>exactCenter: (in category 'converting to rectangle') -----
+ exactCenter: aPoint 
+ 	"Answer a Rectangle whose extent is the receiver and whose center is exactly aPoint. This is one of the infix ways of expressing the creation of a rectangle."
+ 
+ 	^ Rectangle exactCenter: aPoint extent: self!

Item was added:
+ ----- Method: Rectangle>>pointAtFraction: (in category 'rectangle functions') -----
+ pointAtFraction: relativePoint
+ 
+ 	| result |
+ 	result := self origin + (self extent * relativePoint).
+ 	^ self isIntegerRectangle
+ 		ifTrue: [result rounded]
+ 		ifFalse: [result]!



More information about the Packages mailing list