On Wed, Apr 29, 2015 at 10:12 PM, Peter Uhnák <i.uh...@gmail.com> wrote:

>
>
> On Wed, Apr 29, 2015 at 3:51 PM, Yuriy Tymchuk <yuriy.tymc...@me.com>
> wrote:
>
>>
>> On 29 Apr 2015, at 15:18, Sean P. DeNigris <s...@clipperadams.com> wrote:
>>
>> Natalia Tymchuk wrote
>>
>> Should it really be like that?
>>
>>
>> The problem is that you can't have half-a-pixel if a dimension is odd
>>
>>
>> Well, the methods is not called #centerPixel, nor is the class called
>> PixelatedRectangle. Both #origin and #corner return not rounded values. And
>> any way, I invite everyone to read the bug report by Tommaso, he described
>> in a really nice way:
>> https://pharo.fogbugz.com/f/cases/15445/Rectangle-center-not-really-a-center#BugEvent.126062
>>
>
> I thought so too, but if you read the class comment:
> "I represent a rectangular area of the screen."
>
> So it seems designed for screen, and screen operates on whole pixels.
> Thus there is no reason to round #origin or #corner because it will be
> always integer (for screen).
>
> So maybe split into Rectangle (=An actual rectangle) without rounding and
> ScreenRectangle?
>
> Peter
>

Yeah. But how old is that class comment?  :)
Rectangle>>aboveCenter is dated 2000.  Rectangle>>center has no date.  The
world moves on....  so we can make it what we will.   Simple naive fix...
change the class comment (if indeed usage has moved on from assumption of a
pixelated screen)

So apart from working around class comments, what do we gain by having two
types or Rectangles?

cheers -ben

Reply via email to