Edited the AnimatedLine class to support polygon bounds.