05-25-2010, 01:52 PM
brianmount Wrote:Maybe I misunderstood. I was thinking that my client was supposed to adjust the bounds. Is that right? Or do you just mean that the user, when designing the interface, should leave more space around the text? If the latter, then I don't need to worry about it. But if the RIVA client software does the adjustment, is it the case that I take the bounding box passed in the DrawTextFX command and shrink it down before drawing?
The RIVA client would need to do it. It's not so much shrinking the bounding box, but shrinking the area that you do the justification within. The bounding area (if you mean the area the output is clipped to) would still be the overall widget area. But you just want to, during justification of the text within that area, adjust for the fact that the text is going to be three or four'ish pixels larger than the actual text after it's blurred, so you need to account for that.
So, you might take the original drawing area, and create another one with the sides imploded in by a few pixels (however much your blur ends up being) and use that for the actual calculation of the text for justification and wrapping purposes, but then use the original area for the clipping of the output. And of course when doing a drop shadow, the offset of the text drawn over the shadow would be relative to that inward adjusted position as well.
Does that make sense? I could send you my code for that, though I'm not sure it would make sense (given that I find it complicated and I wrote it :-) But I ultimately came up with a pretty sensible scheme to deal with the blurring and reflection and the positioning thereof and the horz/vertical offset values. Sometimes it treats the blur or the drop reflection as the text and the real text as the thing to offset and sometimes the other way around, depending on which thing would be the part that's up against the edge being justified against.
Give me a minute here. I'm waiting on a long build, so I'll try to go back and decipher it again and provide a summary of what I do.
Dean Roddey
Explorans limites defectum
Explorans limites defectum