[quote]@Norman Palardy Y is the “baseline” not “the top to draw from” (see http://documentation.xojo.com/index.php/Graphics.DrawString )
You probably clip the first line right off with y = 0
I’m surprised it doesn’t behave the same on OS X
Usually I set Y = text ascent + a couple pixels for padding[/quote]
Norm, I realize that, and I mentioned in a later post that I had over-simplified my example. I’ve been using g.TextHeight rather than g.TextAscent to set my initial position (the user can drag the text around the screen), but changing it doesn’t seem to make a difference.
@Michel Bujardet When I say that I’m putting the text over live video, I’m actually doing all the work in a canvas with standard Picture objects. The video images come in from MBS DirectX or QuickTime plug-ins as Pictures, get rotated, scaled, adjusted and then graphical and text overlays drawn onto them before being displayed on the canvas. I’m not making use of an HTML view at all.
@jim mckay Jim, you were absolutely correct, adding the width parameter solved the problem of all the lines not getting displayed! Thanks for the suggestion.
The only issue still is that when the alpha channel value is anything other than x00, the font looks like it changes. You can see this difference in the two images below where the user has selected an opacity of 99%. I would probably chalk this up to anti-aliassing or the like, but if you look closely the character spacing changes. Of course none of this occurs in the Mac build.
Sorry for the potato quality screen grabs, it’s daytime and I don’t have access to the telescope to come up with ones that are useful…
4 lines of text, alpha value at x00 (100% opacity), no Width parameter:
4 lines of text, alpha value at x03 (99% opacity), no Width parameter:
4 lines of text, alpha value at x03 (99% opacity), .Width parameter set to Canvas.Width: