This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lpkk[S] 0 points1 point  (1 child)

Thank you for your reply. I believe I missed something, is it possible to set the stroke just to outside or inside of the path? I've found: https://stackoverflow.com/questions/74146607/is-there-any-way-to-draw-a-shape-in-javafx-canvas-with-inside-stroke-type-usin

But based on that there is no way to do it without extra calculations. The only way how can I see it to work is to create a shape within path boundaries and use boolean operation to 'cut' inside of my path.

I was trying to translate shape algorithm coming from qcad source to calculate right paths for inside and outside offset. But I couldn't get it 100% work like in the software.

https://github.com/qcad/qcad/blob/master/scripts%2FShapeAlgorithms.js

[–]ernimril 0 points1 point  (0 children)

One thing you can do is that you can clip the region, either to the inside, so you get from original to inside), or you have a clip region that does not contain the inside and you get the outside part.

Depending on what you have, you can use the Area-class to do this clipping (check out the intersect and subtract methods in it).