A bit of shading in 3d

I have written a simple 3d engine, it works smooth with any objects and now I wrote down a simple flat shader which works fine but unfortunately I have to use old moveTo lineTo drawing API to be able to draw each triangle with different shading alpha, does anyone knows if I could use drawTriangle method with diffent alpha for each triangle?

I’d prefer it as I use it in my code for bitmap drawing

Dave