Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The closest way to a real result for pcs file #104

Open
fabricocouto opened this issue Jul 19, 2024 · 0 comments
Open

The closest way to a real result for pcs file #104

fabricocouto opened this issue Jul 19, 2024 · 0 comments

Comments

@fabricocouto
Copy link
Collaborator

image
int colorstop = 0;

for (i = 0; i < stitches_count; i += 1)
{
c0 = readbyte(file);
x0 = readInt24le(file);
c1 = readbyte(file);
y0 = readInt24le(file);
ctrl = readbyte(file);

if (ctrl == null)
{
    break;
}
if (ctrl == 0x00)
{
    flags = StitchType.fNORMAL;
    dx = signed24(x0);
    dy = -signed24(y0);
    dx *= PC_SIZE_CONVERSION_RATIO;
    dy *= PC_SIZE_CONVERSION_RATIO;
    pattern.AddPointAbs(ref dx, ref dy, ref flags);
}
if (ctrl == 0x03)
{
    if (colorstop == 0)
    {
    }
    else
    {
        flags = StitchType.fSTOP;
        pattern.AddPointAbs(ref dx, ref dy, ref flags);
    }
    colorstop = 1;
}

}
flags = StitchType.fEND;
pattern.AddPointAbs(ref dx, ref dy, ref flags);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant