def METHOD_NAME(self, fctx, x, y, w, h):
     # Returns area position with centering applied.
     screen_w = fctx.get_profile_property(fluxity.PROFILE_WIDTH)
     screen_h = fctx.get_profile_property(fluxity.PROFILE_HEIGHT)
     constraints = fctx.get_editor_value("Centering")
     if constraints == TypeWriter.CONSTRAINT_CENTER or constraints == TypeWriter.CONSTRAINT_HORIZONTAL:
         x = round(screen_w / 2 - w / 2)
     if constraints == TypeWriter.CONSTRAINT_CENTER or constraints == TypeWriter.CONSTRAINT_VERTICAL:
         y = round(screen_h / 2 - h / 2)
     return (x, y)