Hello Martin,
Wednesday, October 11, 2006, 2:40:16 PM, you wrote:
MG> The preceding comment talks about get_{width,height} being used to
MG> figure out the bounding box of the character, so I think you'd need to
MG> make up an enclosing rect from the height and width, stuff that
MG> through enclose_transformed_rect and measure the difference between
MG> the max and min x and y (plus 1?) of what comes out.
Yes. As a simple example, a rotating rectangle changes constantly its
_width and _height properties.
It should be unnecessary to add 1 to the result as this still are
twips (float value).
MG> I am assuming that callers of these functions want overall width and
MG> overall height of the transformed characters, though I don't see how
MG> that information is very useful on its own,
Indeed, I can think of no real example, though it may be useful when
you really need the height (on screen) of a sprite.
MG> since after transformation
MG> the bottom left corner of the transformed object might be below (0,0),
MG> so at that point they should be dealing in bounding rectangles, not
MG> raw width and height.
That's what I would need to compute the "invalidated" region of the
stage (which needs to be re-rendered). As I could not find a suitable
function for that I added my own. It's not in CVS yet as I still need
to test it carefully.
MG> I'd check where those functions are called from and see what the
MG> callers actually want to know.
They're properties you can use in ActionScript, like:
trace("before rotation: " + this._height);
this._rotation += 45;
trace("after rotation: " + this._height);
Udo
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev