HaxePunk/HaxePunk — pull request #211 by steinarvk (2014-02-04 21:35:24+00:00)
Title: Fix undocumented side-effect in AtlasRegion.clip

AtlasRegion.clip shouldn't change the Rectangle
clipRect that is passed as a parameter (at least,
this isn't mentioned in the documentation).

This change makes a local copy of the rectangle,
avoiding the unintended side effect.

The side effect causes a bug when this function
is called in Emitter.setSource while setting up
the AtlasRegions for the different frames of an
animated particle particle effect in hardware
rendering mode. This change should resolve the
problem.