IDXTScaleOutput Interface

The IDXTScaleOutput interface is an optional interface supported by certain image transforms. It enables you to scale transform output to a specified size. It is typically supported by zero input image transforms, such as the Gradient sample included with the SDK.

If a transform supports this interface, the output is scaled when the transform's Execute method is called. This saves you the extra step of creating an IDXTScale interface to scale the output of the first transform.

To use this interface, instantiate an IDXScaleOutput Component Object Model (COM) pointer and call QueryInterface on the transform as shown in the following:

    CComPtr<IDXTScaleOutput>		cpTScaleOutput;
    ...
    hr = cpTrans->QueryInterface( IID_IDXTScaleOutput, (void**) &cpTScaleOutput );

You can then use the returned pointer to access the IDXTScaleOutput interface method.

This interface inherits from the IUnknown interface.

IDXTScaleOutput Method

SetOutputSize Sets the size of the scaled transform output.

IDXTScaleOutput::SetOutputSize

IDXTScaleOutput Interface

Sets the size of the scaled transform output.

Syntax

HRESULT SetOutputSize(
    const SIZE OutSize,
    BOOL bMaintainAspect
);

Parameters

OutSize
[in] Size of the output to use for scaling.
bMaintainAspect
[out] Boolean that determines whether to preserve the aspect ratio of the source to be scaled. If TRUE, the output result will be scaled to the specified size while preserving its aspect ratio. If FALSE, the input dimensions will be stretched to match the output size.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

See Also

IDXTScale


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.