0
Canvas Transformations
how to draw square and in that square draw a line to form two triangles with the different color but don't separate the triangles. please help!!!!
2 Respostas
0
You have to draw the triangles then the line... What are the problem?
0
ctx.drawRect(dimensions);
ctx.drawLine(dimension);
and how to draw the two filled triangles you can read here:
https://stackoverflow.com/questions/4839993/how-to-draw-polygons-on-an-html5-canvas#4840009