I swear this feels like a bug in GMS 2. I can't reproduce it in other project files, but in my main project I have the following code:
The result is... nonsensical. The rectangle without an outline is drawn at the expected location, but if it has an outline, it draws the rectangle offset down one pixel. I can change the yellow rectangle in the code to draw one pixel higher and it draws as expected.
If I copy the same code into another project, though, this does not happen.
As you can see here, the c_aqua rectangle is visible one pixel over the c_yellow rectangle, despite both using the same coordinates.
I know that the coordinate isn't actually changing between these steps, because I've tried writing all the coordinates to the debug output at each point in the code, and the numbers never change. It's just when GMS2 attempts to write to the screen that it handles the outline rectangle differently from the solid one.
Any ideas? This is absolutely baffling to me.
Code:
draw_set_color(c_aqua)
draw_rectangle(x-4,y-13,x+4,y-3,false)
draw_set_color(c_yellow)
draw_rectangle(x-4,y-13,x+4,y-3,true)
If I copy the same code into another project, though, this does not happen.
As you can see here, the c_aqua rectangle is visible one pixel over the c_yellow rectangle, despite both using the same coordinates.
I know that the coordinate isn't actually changing between these steps, because I've tried writing all the coordinates to the debug output at each point in the code, and the numbers never change. It's just when GMS2 attempts to write to the screen that it handles the outline rectangle differently from the solid one.
Any ideas? This is absolutely baffling to me.