The_dude8080 Posted October 16, 2016 Share Posted October 16, 2016 Hello. I want to do create a bitmapdata polygon shape like the ones you can create using graphics. I can make bmd rects... how can I make polygons specifying their vertices coordinates? Link to comment Share on other sites More sharing options...
drhayes Posted October 17, 2016 Share Posted October 17, 2016 I believe you have to calculate it yourself and draw the lines using the "line" method. Link to comment Share on other sites More sharing options...
The_dude8080 Posted October 17, 2016 Author Share Posted October 17, 2016 4 minutes ago, drhayes said: I believe you have to calculate it yourself and draw the lines using the "line" method. Oh ok. Can I also use ctx for that? I am not beeing able to draw lines with bmd.ctx Link to comment Share on other sites More sharing options...
drhayes Posted October 17, 2016 Share Posted October 17, 2016 BitmapData objects have a "line" method, so you don't have to access the BitmapData ctx directly. Link to comment Share on other sites More sharing options...
PhasedEvolution Posted October 18, 2016 Share Posted October 18, 2016 wow I was also interested in that! Link to comment Share on other sites More sharing options...
The_dude8080 Posted October 18, 2016 Author Share Posted October 18, 2016 16 hours ago, The_dude8080 said: Oh ok. Can I also use ctx for that? I am not beeing able to draw lines with bmd.ctx oh good . ty! do you know how can I color the space under the lines I draw. If I fill() the bmd it colors the entire squared bmd that contains the lines... Link to comment Share on other sites More sharing options...
drhayes Posted October 18, 2016 Share Posted October 18, 2016 As far as I know, BitmapData doesn't have a way to fill arbitrary polygons with color. You might have to write your own method to do that. Link to comment Share on other sites More sharing options...
Recommended Posts