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!

Graphics2D Scaling + Line Thickness

843806Mar 6 2008 — edited Mar 17 2008
i want to be able to scale my graphics context but retain my stroke width.
if i know the stroke width i can hack this up myself by using
stroke = new BasicStroke(prevWidth / gfx.getTransform().getScaleX())
assuming the x and y are scaled the same (they are).

is there another way to do this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2008
Added on Mar 6 2008
5 comments
551 views