Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Font Problem



Thank you for the advice.  I tried it out, here are the results

I scaled it down before I wrote to it, and it had the output described earlier.
I scaled it down AFTERWARDS, and it plain ol' didnt scale the graphics2d object!! I tried to scale it twice after painting to it, but it also did not scale after painting to it..

Thanks though!


CC: email@hidden
From: email@hidden
To: email@hidden
Subject: Re: Font Problem
Date: Thu, 28 Aug 2008 20:40:19 -0400

Instead of drawing to the graphics2D and then scaling that down, try applying a scale transform to the graphics2d so that it draws the text the size you want it in the first place.


On Aug 28, 2008, at 7:52 PM, xxxx xxxx wrote:

hey guys,

I actually took the time today to narrow down my problem from something that contained a large number of classes, down to 2 classes that can display the problem.

I guess at this point Im looking for a little bit of help, or is it a lot of help?  Anyway, here's the issue ---

1.  I write text to a graphics2d object
2.  I scale the graphics2d object and print it to screen.
3.  The first | marks the mid-point of the scaled graphics2d image
4.  The '--Good--' designates one line of text that is printing out in the correct position - centered over the |
5. The '--Bad--' text designates the problem text - it is right aligned with the scaled graphics2d object, while it should also be centered over the pipeline - |

As a quick summary as to what is happening with the 'bad' text, the '--bad--' text SHOULD be centrally aligned to the '|', the midpoint of the scaled graphics2d object.  However, what seems to be causing the issue is that I am saving the font, and re-loading it from a file.  For some reason this seems to be causing the mis-alignment!  But the font is picked up correctly, and it even seems to calculate the print position correctly.

Anyway, I this only happens on mac computers, and I am developing on OSX 10.3.9 with java 1.4.2.

To set this up, put the "vfn" file in the running directory of the running program. The 2 files in testMe should be part of the testMe package, and the test main class should be run.

Thanks to anyone who takes a look at this!

Thanks


Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®. Make your smash hit <TestMe.zip> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Talk to your Yahoo! Friends via Windows Live Messenger. Find Out How
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Font Problem (From: xxxx xxxx <email@hidden>)
 >Re: Font Problem (From: Galen Rhodes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.