Lv_window resize

Description

What would be the left resize formula?
So far I’ve only managed the bottom right resizing formula.

Code to reproduce

static void resize_br_event_handler(lv_event_t *e)
{
  lv_event_code_t code = lv_event_get_code(e);
  lv_obj_t *win = lv_event_get_user_data(e);

  if (code == LV_EVENT_PRESSING)
  {
    lv_indev_t *indev = lv_indev_get_act();
    lv_point_t vect;

    lv_indev_get_vect(indev, &vect);

    lv_coord_t w = lv_obj_get_width(win) + vect.x;
    lv_coord_t h = lv_obj_get_height(win) + vect.y;
    lv_obj_set_size(win, w, h);
  }

  else if (code == LV_EVENT_PRESSED)
  {
    lv_img_set_src(cursor_obj, &resize_arrow);
  }

  else if (code == LV_EVENT_RELEASED)
  {
    lv_img_set_src(cursor_obj, &mouse_cursor_icon);
  }
}

This is the bottom left resizing formula.

static void resize_bl_event_handler(lv_event_t *e)
{
  lv_event_code_t code = lv_event_get_code(e);
  lv_obj_t *win = (lv_obj_t *)lv_event_get_user_data(e);

  if (code == LV_EVENT_PRESSING)
  {
    lv_indev_t *indev = lv_indev_get_act();
    lv_point_t vect;

    lv_indev_get_vect(indev, &vect);

    lv_coord_t x = lv_obj_get_x_aligned(win) + vect.x;
    lv_coord_t w = lv_obj_get_width(win) - vect.x;
    lv_coord_t h = lv_obj_get_height(win) + vect.y;
    lv_obj_set_x(win, x);
    lv_obj_set_size(win, w, h);
  }

  else if (code == LV_EVENT_PRESSED)
  {
    lv_img_set_src(cursor_obj, &arrow_resize_tr_bl);
  }

  else if (code == LV_EVENT_RELEASED)
  {
    lv_img_set_src(cursor_obj, &mouse_cursor_icon);
  }
}