Re: Object Graphics fonts [message #39728 is a reply to message #39240] |
Wed, 09 June 2004 14:35   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"Michael Wallace" <mwallace.no.spam@no.spam.swri.edu.invalid> wrote in
message news:10cervakueidj58@corp.supernews.com...
>>> Maybe someone out there can explain this. It seemed that the appearance
>>> of a Y axis annotation would change depending on the size of the strings
>>> in the text labels. For example, when one of my plots had a yrange of 0
>>> - 50, the Y axis text looked really good. However, if I made a plot
>>> where the data range was past 100, the position of the Y axis would get
>>> pushed over as expected. However, the rendering of the text would
>>> degrade tremendously. The thing that I couldn't understand was why the
>>> text would change in appearance just because it was rendered in a
>>> difference location.
I think I explained this before. It isn't the location, it is the scaling
of your model space, and that's what the bug (fixed for 6.1) was about.
Actually, I can't be certain because I can't tell from your post if you
changed the range from [0, 50] to [0, 100] or to [50,100]. If the former,
then the size of the range has changed, and that may have been enough to
cause the quality problem.
>> Ah, I think what has been happening to you is that
>> you were changing the scale of the Y axis after you
>> created it. But you weren't recomputing new text properties
>> after doing so. This could indeed make the text appear "ugly".
>> I recommend you set the RECOMPUTE_DIMENSION keyword to 2 on
>> all of your text objects (including those you get from the axis
>> itself with TICKTEXT). That should solve a lot of problems for
>> you. :-)
>
> Thanks, David. Setting RECOMPUTE_DIMENSION didn't really seem to change
> that much. The text now looks the same no matter where it gets
> positioned because of the tick labels, however it doesn't look much like
> the equivalent text written directly on the model. So, the mysterious
> text changing has been solved, but the text still doesn't look right.
> Is this due to some ordering/creation problem that may exist in my code?
Probably not.
One thing you can try is setting the RENDER_METHOD property to 1 on your
axis text objects. The bug I mentioned above had to do with computing the
size of the glyph box that Freetype uses to render the glyph. If the box is
miscalculated to be too small, the glyph quality will decline. Setting
RENDER_METHOD to 1 goes back to the pre-6.0 method of tessellating the glyph
outlines into a lot of small triangles and drawing those. This method had
its own problems, the biggest being naive anti-aliasing of the glyph
outlines. You can just try it to see how it looks.
> Could you (or anyone else) explain a little bit about how object
> graphics really work in this regard? Specifically, what gotchas are
> present if a keyword is set in the object instantation rather than being
> set afterwards via SetProperty?
Should be none. Any property interactions should be documented.
> What about the order of adding objects
> to a model and then setting other properties of the object? For
> example, say I have an IDLgrModel and add an IDLgrAxis to it. I then
> choose to set something via SetProperty of the IDLgrAxis. Could this
> potentially cause a different image to get drawn than if I had set all
> of the properties before adding the axis to the model?
No.
> Of course, there's the issue of making sure things are added to the
> model in the correct order, especially when you have an IDLgrImage (the
> topic of another recent thread),
Right, the drawing order depends on the order of the objects in the Model.
Note that there are IDL_Container (a superclass of IDLgrModel) methods that
let you move/shuffle objects around in a model. Also, the IDLgrModel::Add
method has a POSITION kw that lets you insert objects into the model in
places other than the end. So, it isn't strictly the order in which things
are added to the model that determines drawing order, but the final order of
the objects in the model at the time of the draw.
> but are there any other ordering
> problems or anything else that the object graphics novice such as myself
> wouldn't know about?
Transparency - there are other threads about this, but if you have specific
questions, ask.
> I'm sure there's plenty I don't know, but the Top
> 10 Object Graphics Gotchas might help me and some other aspiring object
> graphics programmers.
>
> -Mike
|
|
|