gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [Gnash-commit] gnash/backend render_handler.h


From: Udo Giacomozzi
Subject: Re[2]: [Gnash-commit] gnash/backend render_handler.h
Date: Tue, 17 Apr 2007 14:15:53 +0200

Hello strk,

Tuesday, April 17, 2007, 1:55:38 PM, you wrote:
>> The video is streched (*apparently* regardless of aspect ratio!) to
>> that size, so no crop is necessary.

s> If this is the case I agree with you, it is completely unecessarly to have
s> that argument, as the scale can be concatenated with the matrix parameter, 
right ?

No, there are *two* scales: one for the video container (I called it
"video instance"), and one for the video itself.

Example:

You have a SWF with a 320x240 pixel (6400x4800 TWIPS) video
*container* that loads a video (FLV) which is sized 160x120. This
means that the renderer has to double the video frames (in size),
however the matrix is still an "identity".

Now say the video *container* is scaled by 150% using _xscale/_yscale
in ActionScript. Now the matrix will have it's scale fields to 1.5 but
the video needs to be scaled by 300%.

You need

- the untransformed bounds to know the *outline* of the video
  *container*
  
- the matrix to:
  - move, scale and rotate that outline (applied to "bounds")
  - move, scale and rotate the video (matrix is changed before being
    applied)
    
- the frame size of the video itself so that it can be streched to the
  container outline

When you concatenate the video-to-container scale to the matrix you
will also scale the container, which is not what you want.

Think like the FLV video is a child of the container.

So the information contained in "bounds" *is* important, but it's
overkill to use Range2d for that since minX and minY will *always* be
zero and Range2d instance does nothing but carrying two "double"
values.

Udo
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]