Matt Legend Gemmell Modesty is Lying

Mac OS X Cocoa and iPhone Development Services available at Instinctive Code.
Mac OS X Cocoa and iPhone Developer for hire

Other Pages

Categories

Posted
9 November 2007 @ 5pm

Categories
Development, Source

Tags
, , , , , , ,

MGViewAnimation minor update

Just a minor update this time, to resolve an issue which affects both NSViewAnimation and (prior to this update, of course) MGViewAnimation too. Views placed right next to each (with no space between) would sometimes develop a 1-pixel gap during the course of an animation which moved them both in the same direction. As you might have already guessed, that was due to attempting to place those views on sub-pixel boundaries based on the progress value of the animation. We now apply a mighty round() to the origin point of each new frame for a view during the animation, so their relative positions should remain consistent.

Cheers to Brian Amerige for pointing out the issue, and cheers to me for rounding the hell out of it. Code is available, as always, on the Cocoa Source Code page.


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

Blog redesign Do you use my source code?