Re: [Pharo-dev] Better class comment version2

2016-01-10 Thread David Allouche
Oh thanks, that explains the problem I observed and why I did not spot the bug in all the time I spent staring at it in the debugger: the values were there in the rectangle, only swapped between origin and corner! Maybe receiving a rectangle as the second argument of #fractions:offsets: should

Re: [Pharo-dev] Better class comment version2

2016-01-10 Thread Thierry Goubier
Hi David, this is the bug with LayoutFrame>>#fractions:offsets: we were talking about relative to that class comment. In Pharo, Rectangles are constrained to have the smallest vertical value as the top, smallest horizontal value as the left, largest vertical value as bottom and largest horizonta

Re: [Pharo-dev] Better class comment version2

2016-01-10 Thread David Allouche
I guess that is a class comment for LayoutFrame. I think this is great improvement. By I the way, I noticed something really strange when I was using it in my learning project of a TicTacToe game. I started initializing a LayoutFrame using #fractions:offsets:, but I had strange incorrect result

[Pharo-dev] Better class comment version2

2016-01-09 Thread stepharo
I define a transformation frame relative to some rectangle. I'm basic data structure used for graphics. I represent two groups of distances: - The fractional distance (between 0 and 1) to place the morph in its owner's bounds - Fixed pixel offset to apply after fractional positioning (e.g., "10