Mantis - Squeak
Viewing Issue Advanced Details
2709 Morphic minor always 02-12-06 03:59 03-14-06 16:14
wiz  
 
normal  
closed 3.9  
fixed  
none    
none 3.9  
0002709: Sample instances have their leftmost row of pixels clipped off.
For this one ask for a sample instance of a polygon. Or drag one out of the supply flap or object calalog morph.

The left most border will be too narrow.

Pick it up and drop it a few times and the hidden row of pixels will reappear.
This seems like a symtom of a rounding or truncation error.

See also Mantis 0002453. "What is the extent of a truncated rectange."

And Mantis 0002568 "How much should warpblt inherit from bitblt."

I've added this issue because it is a specific problem.
Let's see what it takes to fix it.

Yours in service -- Jerome Peace

child of 0006511new  Mother of all Morphic Graphical off-by-one/fencepost -error reports. 
 CurveBoundsTRFix-wiz.2.cs [^] (6,666 bytes) 02-23-06 22:20

Notes
(0003755)
wiz   
02-12-06 19:49   
Clarification,

I tried a few examples, not every object loses pixels. And the polygon was actually the CurveMorph.

The culprit was aggressive premature truncation/rounding in PM>curveBounds. The fix was to remove the truncation from that method and add an appropriate adjuster ( self curveBounds expanded) in the calling method.

So there are two halve to the fix. The Point and Rectangle methods to do appropriate adjustments.
The changes to PolygonMorph methods computeBounds and curveBounds.

Change set CurveBoundsTRFix-wiz.2.cs contains Both the point/rectangle methods and the application of them to Polygon>computeBounds and CurveBounds,

With the point/rectangle methods in the image more fixes can be attempted for other classes. T/R errors abound in squeak.

Yours in service, -- Jerome Peace

(0004473)
MarcusDenker   
03-14-06 16:14   
7008