This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-10-04 12:05:50

bernatp
Scratcher
Registered: 2007-03-07
Posts: 49

Distortion

In some cases (maybe when width or height is an odd number (?) ) displaying of a sprite is wrong when sprite is pointing down.
http://scratch.inf.elte.hu/stuff/torz.gif

Offline

 

#2 2007-10-04 12:44:28

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Distortion

Do you have a little project that shows the distortion?---the gif you provided a link to does not contain enough information to debug the problem.


One common cause of distorted sprites are directions that are not quite 90, 180, -90, or 0 degrees.  An angle of 0.1 degrees can result in distortion, though not exactly what you show.

Offline

 

#3 2007-10-05 14:22:50

bernatp
Scratcher
Registered: 2007-03-07
Posts: 49

Re: Distortion

Here is a sample:

http://scratch.inf.elte.hu/stuff/distortion.sb

(Click on the green flag.)

Offline

 

#4 2007-10-06 11:40:47

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Distortion

Yes, that certainly shows the distortion on my Mac.
The 45 by 18 rectangle gets badly distorted when rotated 90 degrees.

Changing it to a plain rectangle still has the same problem.
Changing the color doesn't change the problem.
Moving the rotation center doesn't fix it, nor does moving the rectangle in the edit window or moving the sprite location.

This looks like definite bug in the rotation code---perhaps someone converting floats to integers by truncating rather than rounding or using floor, since the right half of the resulting image comes out ok, but the left half is missing pixels.

Scratch team, you have a genuine, replicatable bug here!

Offline

 

#5 2007-10-09 02:36:02

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: Distortion

Thanks! You guys are the best QA engineers ever  smile


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

Board footer