Re: JSUI-MGraphics patch-a-day


Forums > Javascript > JSUI-MGraphics patch-a-day
November 11, 2011 | 8:58 pm

Thanks, Rymf – I’m having a blast with this!

Here is the patch for November 11, 2011.

When you create a surface for drawing (using the separate MGraphics instance we saw last time), you don’t have to make an opaque surface – it can be alpha channel reduced, allowing us to make semi-transparent figures that can be reused. In this case, I make a Big Red Square, scale the user space when drawing it, then draw a blue circle over the top. Everything is half-alpha’d, so you get a little see-thru no matter what happens.

Enjoy!