Not sure whether this is what you're looking for, but when you run this program you see the x and y pixel values relative to the center of the canvas:
box()
width = scene.width = 500
height = scene.height = 500
pos = label()
while True:
rate(60)
p = scene.mouse.pos
xx = int(p.x*0.5*width/0.87)
yy = int(p.y*0.5*height/0.87)
pos.text = vec(xx,yy,0)
Bruce