Truncation and round off

nicolas cellier ncellier at ifrance.com
Sun Feb 5 14:18:33 UTC 2006


> I'd like to add that this incompleteness is part of a
> problem morphic has in displaying graphics. See:
>
> http://bugs.impara.de/view.php?id=2453
>
> Summary  0002453:
> [Bugs] What is the extent of a truncated rectangle?
>
> The basic problem was that truncation and rounding did
> not mix well with rectangles. Particularly when
> rectangels were mixing with rendering Transformation
> morphs.
>
> Part of the solution would be to have more choices
> particular ceiling and floor options for rectangles
> (an by extention Points.) I was headed in that
> direction as  I attempted fixes to the errors. If a
> set of vocabularies exist that would also make squeak
> more compatable with other smalltalks and we have all
> the necessary permissions to include them. Then I say
> squeak could use them. The sooner the better.
>
> Yours in service, -- Jerome Peace
>

I perfectly understand that you need to round the rectangle toward interior or 
exterior.

Base VW is not better than Squeak, both have trivial st-80  implementation 
that will also round topLeft and bottomRight to nearest.

I think you'll have to invent the messages or look elsewhere.

Putting a constraint like:
 aRectangle truncated extent = aRectangle extent truncated
whatever the coordinate transform is does not sound easy: maths say it is 
simply impossible even without a rotation (unless rectangle sides are 3*n and 
4*n).

But I do not see why you need to do rounding in intermediate steps.
Isn't rounding deferred until rendering and intermediate coordinates kept 
Fraction or Float ?




More information about the Squeak-dev mailing list