drawing Rectangles in winforms c# help
This code is flawed as when u drag the cursor from bottom to up it stills draws the rectangle upwards. Any suggestions?
1 Reply
you need two positions if you want the direction to affect how it draws
ah actually no, you already have one, e.Location
you just have to update the stored position so it's withing a circle of a radius of the size of the square around the cursor
if it's already within, keep it as is
if not, project it onto the circumference of the circle
if that's what you meab
if you don't know what this is, learn linear algebra
watch 3b1b's series on youtube
ah no you mean something else for sure
well that's just because you're doing the absolute value
you need to make the smallest (x, y) the top left