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@0.5), #topLeft + (meaning 0.0@0.0), #bottomCenter (meaning 0.5@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]!
Hi Marcel,
NOTE THAT for proportions that equal 1.0, the resulting point will NOT lie
within the receiver, i.e., #containsPoint: will answer false."
could you explain shortly why #containsPoint: needs to answer false for the receiver's #bottomRight? This was shocking to me. :D
Best, Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von commits@source.squeak.org commits@source.squeak.org Gesendet: Mittwoch, 8. Juni 2022 14:50:07 An: squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org Betreff: [squeak-dev] The Trunk: Graphics-mt.520.mcz
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@0.5), #topLeft + (meaning 0.0@0.0), #bottomCenter (meaning 0.5@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]!
squeak-dev@lists.squeakfoundation.org