Skip to content

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 #213

Description

@fabricocouto

image

in pesWriteEmbOneSection

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions