1 Reply Latest reply on Jan 27, 2009 1:15 PM by Zen Seven

    BitmapData.draw and clipRect

    Zen Seven Level 1
      Hello,

      I'm writing a sprite animation system that requires transformations on individual sprites that are stored as BitmapData sprite sheets.

      I've been using BitmapData.draw to do my work - which has worked well for individual bitmap files, but when it comes to transforming only a piece of a bitmap, which is what clipRect is supposed to do according to the documentation, it doesn't work.

      It looks like clipRect is actually the clipping region for the destination not the source. I'm wondering there's any function that does source clipping before transform to destination. Otherwise, I fear I'm going to have to use an intermediate bitmapData to copy my frame of the sprite to before I transform it.

      Regards!