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!!!!

31st Aug 2018, 8:22 AM
Mutegeki Brian
Mutegeki Brian - avatar
2 Réponses
0
You have to draw the triangles then the line... What are the problem?
31st Aug 2018, 9:04 AM
KrOW
KrOW - avatar
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
31st Aug 2018, 9:30 AM
BraveHornet
BraveHornet - avatar