Skip to content

Using Clipper Offset with PathsD #442

Discussion options

You must be logged in to vote

Hi Duncan.

Yes, you're correct that ClipperOffset::AddPaths(const PathsD &p, ...) doesn't do any scaling and simply truncates to integer values.

And looking at this again now, I'm very much inclined toward removing this overloaded method and allowing only ClipperOffset::AddPaths(const Paths64 &p, ...), especially since the result of ClipperOffset::Execute will always be a Paths64 object. And this would avoid any scaling confusion such as you're experiencing now. Nor should this cause inconvenience, because the Clipper::Inflate() function would still accept PathsD objects, and it scales too (defaulting to 2 decimal places). And of course it also de-scales the result.

So in doing this, Clip…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@duncanspumpkin
Comment options

Answer selected by duncanspumpkin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants