Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

triangles instead of a rectangle. Why?

rectangle triangles
0
Posted

triangles instead of a rectangle. Why?

0

int xPoints[] = {71, 78, 71, 78}; int yPoints[] = {147, 147, 130, 130}; g.fillPolygon(xPoints, ypoints, xPoints.length); Developer Felix Pahl supplied the answer in limerick form: o A developer (for details bored her) didn’t follow the polygon’s border so instead of right angles she got two triangles ’cause the endpoints were in the wrong order! You must put the points in the order you would encounter them in if you went round the polygon’s border. The filling algorithm is doing the right thing!

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123