IDXTScale interface

The IDXTScale interface controls how the transform scales the input data to produce the output surface and what filter type it should use. This interface inherits from the IUnknown interface.

Members

The IDXTScale interface inherits from the IUnknown interface. IDXTScale also has these types of members:

  • Methods

Methods

The IDXTScale interface has these methods.

Method Description
GetScales

Retrieves the x-axis and y-axis scale factors.

ScaleFitToSize

Sets the scale factors used to fit a portion of the input to match a specified size.

SetScales

Sets the x-axis and y-axis scale factors.

 

Remarks

This interface supports the Quality property, which is used to select a filter to use during scaling. If the value for Quality is below 0.333, the scaling operation uses a nearest neighbor filter to determine the color of the source pixel. For values greater than 0.333, a bilinear filter is used, which results in smoother color transitions. You can access this property through the IDXTransform::SetQuality and IDXTransform::GetQuality methods.

To use the IDXTScale interface, you must first create a scale transform with the DXTransformFactory object. Then call QueryInterface on the resulting transform with IID_IDXTScale as the IID, as shown in the following code example.

    hr = g_pTransFact->CreateTransform(
    NULL, 0, NULL, 0, NULL, NULL, CLSID_DXTScale,
    IID_IDXTransform, (void **)&g_pScalerTrans );
                                
    hr = g_pScalerTrans->QueryInterface(
    IID_IDXTScale, (void **)&spScalar );

The returned pointer can be used to access any of the listed methods.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Dxtrans.h

IDL

Dxtrans.idl

DLL

Dxtrans.dll