DrawRect, FillRect and DrawOval anomaly

191 views Asked by At

while messing about with an example program the lecture sent to the class, I realised that there was an anomaly with the application, I pointed it out and asked him about it but he didn't know what it was doing it.

What I noticed was when drawing a rectangle using the drawRect it did fillRect instead when it had negative numbers for the size, but acted normally when the numbers were postive, while with the drawOval method, when negative numbers were used for the drawing, the image didnt appear within the JPanel.

My question is, Why does this happen when negative numbers are used to work out the size instead of just flipping it around the z/y axis and drawing normally?

0

There are 0 answers