Jump to content

Modifying BitmapData's Array Data


Sturb
 Share

Recommended Posts

So I'm trying to flood fill a specific area on my bitmap data so I can create a mask for that area, however after setting the array data of the bitmap data nothing is showing up. I'm iterating over the length of array and setting rgba values as such:
 

this.bufferData.data[i] = 0;
this.bufferData.data[i + 1] = 0;
this.bufferData.data[i + 2] = 0;
this.bufferData.data[i + 3] = 255;

I then proceed to draw my "buffer" bitmap data into my mask bitmap data as such:
 

this.maskData.draw(this.bufferData, 0, 0, this.bufferData.width, this.bufferData.height, "destination-out");
this.maskData.update();

I've tried calling update() on my bufferData before drawing it into the maskData, however it didn't help. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...