Offset calculatePos(double posX, double posY, double textW, double textH) { return Offset(posX - textW / 2, posY - textH / 2); }