Share via


Figure 1

Figure 1 Transform Used on a Web Page

<HTML>
<HEAD>
<TITLE>Old Fashioned Animation Control demo</TITLE>
</HEAD>

<CENTER><H1> Negative Transform using Animation control<h1></CENTER>

<BODY onLoad="Main()">

<CENTER> <OBJECT ID="DAControl" STYLE="width:320;height:300" CLASSID="CLSID:69AD90EF-1C20-11d1-8801-00C04FC29D46"> </OBJECT> </CENTER>

<SCRIPT LANGUAGE="JScript"> <!--

function Main() { m = DAControl.MeterLibrary;

xf = new ActiveXObject("NegaTransform.Negative.1");
xf.NegativeThreshold = 5;

inputs = new Array(1);      
inputs[0] = m.ImportImage("c:/program files/microsoft platform sdk/       
            samples/multimedia/media/image/nicole.gif");

forward = m.Interpolate(0, 1, 5);
back = m.Interpolate(1, 0, 5);
progress = m.Sequence(forward, back).RepeatForever();

result = m.ApplyDXTransform(xf, inputs, progress);

DAControl.Image = result.OutputBvr;
DAControl.Start();

} //--> </SCRIPT>

</BODY> </HTML>

Figure 2 Using a Transform in Internet Explorer 5.5 FakePre-4658dc4f453a42049e77c2cd65cbb5ea-4afd039ca891495e95b203d7281c0066 Figure 3 IDXTransformFactory Methods

Method
Description
CreateTransform
Creates and initializes a transform
InitializeTransform
Initializes a transform that has already been created by the caller
SetService
Adds a service provider to the transform factory

Figure 4 IDXSurfaceFactory and IDXSurface Methods

IDXSurfaceFactory Methods
Description
BitBlt
Copies samples from one DXSurface to another
CopySurfaceToNewFormat
Copies one surface to another and changes its pixel format
CreateD3DRMTexture
Creates a Microsoft Direct3D Retained Mode texture from a DXSurface
CreateFromDDSurface
Creates a DXSurface object that is aggregated to a specified Microsoft DirectDraw surface
CreateSurface
Creates a DXSurface object of the specified size and format
LoadImage
Binds the specified file name or URL and returns a DXSurface containing the image data
LoadImageFromStream
Loads an image from a specified stream and returns a DXSurface
IDXSurface Methods
Description
GetAppData
Retrieves an application-specific DWORD of data
GetBounds
Retrieves a structure containing the surface's boundary region
GetColorKey
Retrieves the surface's color key value
GetDirectDrawSurface
Retrieves an interface on the underlying DirectDrawSurface object if the DXSurface object is aggregated onto a DirectDrawSurface
GetPixelFormat
Retrieves the pixel format of the surface
GetStatusFlags
Retrieves the status flags of the DXSurface object
LockSurface
Locks a region of the surface and returns a pointer through which you can access samples on DXSurfaces
LockSurfaceDC
Locks a region of the surface and returns an IDXDCLock interface
SetAppData
Sets the surface's application-specified DWORD of data
SetColorKey
Sets the surface's color key value
SetStatusFlags
Sets the status flags of the DXSurface object

Figure 5 IDXTransform Methods

Method
Description
Execute
Executes the transform operation given the specified portion bounds and places the result in the destination data object
GetInOutInfo
Retrieves input or output information about the specified data object, and an optional pointer to it
GetMiscFlags
Retrieves flags that describe the behavior of the transform
GetQuality
Retrieves the quality level used to render the transform result
MapBoundsIn2Out
Maps the input coordinate space to the output coordinate space
MapBoundsOut2In
Maps the output coordinate space to the input coordinate space
SetMiscFlags
Sets transform flags that specify how to generate the output
SetQuality
Sets the quality level used to render the transform result
Setup
Defines the input and output data objects used in the transform

Figure 6 IDXBaseObject Methods

Method
Description
GetGenerationId
Retrieves the current generation ID for the surface
GetObjectSize
Retrieves the size, in bytes, of the data object (for example, a surface or buffer)
IncrementGenerationId
Increments the surface generation ID manually

Figure 7 Retrieving the List of Installed Transforms

ICatInformation *pCatInfo;
IEnumCLSID *pEnumCLSID;
GUID catid = CATID_DXImageTransform;

// instantiate the categories manager CoCreateInstance ( CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC, IID_ICatInformation, (void **)&pCatInfo ); pCatInfo->EnumClassesOfCategories ( 1, (GUID *)&catid, 0, NULL, &pEnumCLSID ); // ... and from clsid you can get to the transform....

Figure 8 CDXBaseNTo1 Class Members
Virtual Functions for Derived Classes:
DetermineBnds (2D)
OnReleaseObjects
OnExecute
OnSetup
OnFreeInstData
OnSurfacePick
OnGetObjectSize
OnUpdateGenerationId
OnGetSurfacePickOrder
WorkProc
OnInitInstData

Helper Functions:
ClearDirty
IsInputDirty
DoDither
IsOutputDirty
DoOver
IsTransformDirty
GetEffectProgress
NeedDestPMBuff
GetNumInputs
NeedSrcPMBuff
HaveInput
OutputMeshBuilder
HaveOutput
OutputSurface
InputMeshBuilder
OutputSampleFormat
InputSampleFormat
SetDirty
InputSurface

Figure 9 COM Map FakePre-2931f5dc860843b1aca27a74d0286ff5-2dd6a1be4d684543a2da135b870c0ec0 Figure 10 IDXARGBReadPtr Methods

Method
Description
GetNativeType
Retrieves the native underlying pixel format of a DXSurface.
GetSurface
Retrieves a pointer to the parent DXSurface.
Move
Moves the sample pointer along the x-axis relative to its current position.
MoveAndGetRunInfo
Moves the sample pointer to a specified row and retrieves a pointer to the run information associated with the specified row.
MoveToRow
Moves the sample pointer to an absolute row along the y-axis and resets the x-axis position to zero.
MoveToXY
Moves the sample pointer to an absolute position.
Unpack
Unpacks the specified number of samples into the supplied buffer in ARGB32 pixel format. Can only unpack a single row. Use UnpackRect to unpack multiple rows.
UnpackPremult
Unpacks the specified number of samples into the supplied buffer in alpha-premultiplied PMARGB32 pixel format. Can only unpack a single row. Use UnpackRect to unpack multiple rows.
UnpackRect
Unpacks a subsection of source samples defined by a rectangle structure and advances the horizontal position of the read pointer. Use to unpack multiple rows.

Figure 11 IDXARGBWriteReadPtr Methods

Method
Description
CopyAndMoveBoth
Copies the specified number of samples from the current position of the source surface to the current position of the output surface.
CopyRect
Copies the specified number of samples from the specified rectangle in the source surface to the current position on the output surface.
FillAndMove
Fills the output surface with the specified sample value starting at the current position and advances the current position.
FillRect
Fills the specified rectangle with the specified sample value, optionally doing an alpha blend with the destination.
OverArrayAndMove
Alpha blends an array of samples over the output surface and moves the pointer a specified number of samples.
OverSample
Alpha blends the specified sample value over the sample at the specified position.
PackAndMove
Places a buffer of ARGB32 samples into the output surfaces and moves the sample pointer.
PackPremultAndMove
Places a buffer of PMARGB32 samples into the output surfaces and moves the sample pointer.
PackRect
Accepts a buffer of either PMARGB32 or ARGB32 samples and writes them to a subsection of the output surface defined by a DXPACKEDRECTDESC structure.

Figure 12 IDXTaskManager Methods

Method
Description
GetConcurrencyLimit
Retrieves the number of threads allowed to execute on a single processor at a given time
GetThreadPoolSize
Retrieves the number of threads in the thread pool
QueryNumProcessors
Retrieves the number of processors installed in the system
ScheduleTasks
Defines a set of tasks to execute
SetConcurrencyLimit
Defines the number of threads that can execute from a thread pool at a given time
SetThreadPoolSize
Specifies the number of threads that should be created and made available to execute tasks
TerminateRequest
Terminates a task based on its request ID value that was used when it was scheduled
TerminateTasks
Terminates a set of tasks previously scheduled by the task manager