I just noticed, that gfx.circle adds an offset of 1 pixel to its position, when half of it is outside of the window.
It adds an offset toward the bottom when it's halfway outside the top of the window and it adds an offset to the right, when halfway outside the left of the window.
The following gif shows the problem:
It deforms some of my graphical elements, that I try to draw and move around in the window.
Tested on Reaper 7.01 on Windows 7
Here's the code I used to test it.
A,B,C and D control the position of the circle:
Code:
y=0
x=0
function main()
gfx.init()
gfx.set(1,1,1)
gfx.rect(x,y,100,100,1)
gfx.set(1,0,0)
gfx.circle(x+50,y+50,50,1)
gfx.x=0
gfx.y=110
gfx.drawstr("x:"..x.." y:"..y)
A=gfx.getchar()
if A==65 then y=y-1 end
if A==66 then y=y+1 end
if A==67 then x=x-1 end
if A==68 then x=x+1 end
reaper.defer(main)
end
main()