$t = new SWFText();
t = SWFText()
SWFText *t = new SWFText();
SWFText t = newSWFText();Create a new text object, fresh for manipulatin'.
SWFText_setFont(t, font);Set the current font to font.
SWFText_setHeight(t, height);Set the current font height to height. Default is 240.
SWFText_setSpacing(t, spacing);Set the current font spacing to spacing. Default is 1.0. 0 is all of the letters written at the same point. This doesn't really work that well because it inflates the advance across the letter, doesn't add the same amount of spacing between the letters. I should try and explain that better, prolly. Or just fix the damn thing to do constant spacing. This was really just a way to figure out how letter advances work, anyway.. So nyah.
$t->setColor($r, $g, $b [, $a]);
t.setColor(r, g, b [, a])
t->setColor(r, g, b [, a]);
SWFText_setColor(t, r, g, b, a);Change the current text color. Default is black. I think.
SWFText_moveTo(t, x, y);Move the pen (or cursor, if that makes more sense) to (x,y) in text object's coordinate space. If either is zero, though, value in that dimension stays the same. Annoying, should be fixed.
SWFText_addString(string);Draw the string string at the current pen (cursor) location. Pen is at the baseline of the text; i.e., ascending text is in the -y direction.
$width = $t->getWidth($string);
width = t.getWidth(string)
width = t->getWidth(string);
width = SWFText_getStringWidth(t, string);Returns the rendered width of the given string at the text object's current font, scale, and spacing settings.
back to index
All content Copyright (C) 2000-2002 Opaque Industries except where noted otherwise.