0 Replies Latest reply on Nov 8, 2007 10:13 AM by Force_Code

    bitwise logical ops on src/dest. bitmaps

    Force_Code
      Those familar with the C/C++ world should understand what I mean by bitwise logical operations, i.e. performing logical AND, OR, NOT on the bits of a src and destination value to get a result.

      Those familiar with Win32 GDI and BitBlt know that it allows ROP codes which enable the bits of a source and destination bitmap to be combined using bitwise logicial operations as above. So for example, the ROP code SRCAND would combine a source and destination bitmap using a bitwise logical AND operator on the binary bits of the two bitmaps.

      I need to do the same thing if possible in either actionscript or flex. I know flex has high level blendmodes for combining src and destination such as BlendMode.OVERLAY BlendMode.DIFFERENCE, (but no BlendMode.AND, BlendMode.OR). There is actually a BlendMode.INVERT which would be the same as NOT (so why would AND and OR be left off). Actionscript has the BitmapData class with methods like CopyPixels, which is essentially the same as Win32 BitBlt, except without any sort of ROP bitwise logical ops apparently.

      With all the various type of complex masking you can do in actionscript, I find it hard to believe that no basic bitwise logical ops between source and destination bitmaps are possible. Is there a way to do them?

      Thanks.