Skip to content

Curve points get included as standard points  #214

@StevenMaude

Description

@StevenMaude

This was noticed following the fix in #213.

Issue is in this code:

https://github.com/sensiblecodeio/pdf2msgpack/blob/bf03c8aff33ba3433541c37f38ba0465d0b6f632/src/DumpPathsAsMsgPackDev.h#L181-L217

Poppler represents subpath curves as three points; two that have curve=true and the final one that has curve=false. The current loop increment we use has j += 2 which skips to the final curve point. This curve point has curve=false and then skips to the else in the loop, so gets included as a standard point, as well as being included as a curve point.

This behaviour was left as is for now, to retain the existing behaviour, while fixing the incorrect values for curves.

Probably what is wanted is to restore the j += 3 behaviour removed in #10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions