so that the converted drawing is in the center of the designer program, it is necessary to change this part of the code for this
int width = (int)bounds.right - bounds.left;
int height = (int)bounds.top - bounds.bottom;
float trans_x = 0;
float trans_y = 0;
trans_x += (float)(350);
trans_y += (float)(100) + height;
trans_x += hoopWidth / 2;
trans_y += hoopHeight / 2;
trans_x += -width / 2;
trans_y += -height / 2;
binaryWriteFloat(file, (float)trans_x);
binaryWriteFloat(file, (float)trans_y);
binaryWriteShort(file, 1);
binaryWriteShort(file, 0); /* Translate X */
binaryWriteShort(file, 0); /* Translate Y */
binaryWriteShort(file, (short)width);
binaryWriteShort(file, (short)height);