texture offset origin coordinates

how to know the coordinates of the origin of the texture offset
in order to be able to position the texture in the center of the brush ?

#does not reset the coordinates of the origin of the texture to the corner of the window
bpy.context.tool_settings.image_paint.brush.texture_slot.offset[0] = 0
bpy.context.tool_settings.image_paint.brush.texture_slot.offset[1] = 0