Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX scaling a group of shapes without affecting stroke width?

jdiligenceDec 3 2015 — edited Dec 8 2015

I have a custom JavaFX 8 component that basically manages a set of shape nodes (paths).

I also need to be able to horizonatal zoom and pan, so I thought I'd put all the shapes in a group and scale/translate the X axis.

However, it looks terrible because the stroke width also scales in a very strange way.

How do I make ONLY the geometry of the shape scale, not the stroke?

With black stroke

Screen Shot 2015-12-03 at 12.48.22.png

With transparent stroke

Screen Shot 2015-12-03 at 12.50.09.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 5 2016
Added on Dec 3 2015
2 comments
1,474 views