Home COM GDI+ WebBrowser Data Access

IDXTScale Interface

 

CLSID_DXTScale

{555278E2-05DB-11D1-883A-3C8B00C10000}

IID_IDXTScale

{B39FD742-E139-11D1-9065-00C04FD9189D}

 

 

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.

 

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 interface identifier (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.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IDXTScale Members

Description

SetScales

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

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

 

FUNCTION IDXTScale_SetScales ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL Scales AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[3] USING IDXTScale_SetScales (pthis, Scales) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetScales

 

FUNCTION IDXTScale_GetScales ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL Scales AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[4] USING IDXTScale_GetScales (pthis, Scales) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

ScaleFitToSize

 

FUNCTION IDXTScale_ScaleFitToSize ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pClipBounds AS DXBNDS _

, BYVAL FitToSize AS apiSIZE _

, BYVAL bMaintainAspect AS LONG _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD @@pthis[5] USING
IDXTScale_ScaleFitToSize (pthis, pClipBounds, FitToSize, bMaintainAspect) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

Page last updated on Monday, 03 April 2006 19:50:59 +0200