Anyone have an example snippet showing how to scale a Font using AffineTransform?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, you don’t really need an AffineTransform to do a simple font scale. You can use
Font.deriveFont(float size)to geet a new `Font object with the specified size.But I suppose you could use
AffineTransform.getScaleInstance(double sx, double sy)and apply the transform to yourGraphics2Dobject (assuming you have one) if you’d rather. It really depends on what you’re doing.