Microsoft DirectX 9.0


The ScaleSourceRect method scales a rectangle, if there is a difference between the native video size and the media type format.


virtual RECT ScaleSourceRect(
    const RECT *pSource



Pointer to an unscaled rectangle.

Return Value

Returns the scaled rectangle.


In the CDrawImage class, this method returns pSource without any change. You can override this method if the filter stretches the incoming video image. For example, the native video size might be 320 × 240, but the media type on the input pin might be 640 × 480. In that case the filter would need to scale the source rectangle by a factor of 2.

See Also