Transformation PlugIns
From RealWorld Wiki
Document transformation plug-ins are similar to the operation plug-ins. Instead of modifying the passed document, they create and return a new document, using information from the original one.
Beside the actual document, the operation can also access view states, the current window and current locale identifier. Document transformation should in normal cases not interact with the user, it can return a localized error message should the need arise.
The Sequence operation can harbor multiple operations as well as transformations. It is currently the only way how to use transformations in RealWorld Designer applications. Typical use case is a sequence of transformation followed by an operation that either opens the document created by the operation in new or current window or saves the document.
Contents |
[edit] Transformations by class
[edit] Common transformations
- Display configuration - show a configuration dialog before the transformation is actually executed giving the user a change to modify transformation's parameters. The dialog may contain a preview window.
[edit] Document-specific transformations
- Raster image from image - create a raster image document from a general purpose image (could be for example rendered image snapshot, image of an icon, etc.).
- Icon from image - create a icon with defined formats and effects from an image.
- Icon from icon or cursor - create a new icon document from an icon or from a cursor.
- Rendered image from scene segment - create a new rendered image document and use the source document as 3D model for the first snapshot.
- 3D Studio object from scene segment - create new 3D Studio-compatible (.3ds) document from the source 3D model.
- Document from rendered image snapshot - get the document referenced in selected snapshot of a rendered image document.
- Raster image from scene segment - render a 3D scene to image. Use camera position from a state and default lighting.
[edit] Implementing a Transformation
From technical point of view a Transformation plug-in is a COM class placed in a category CATID_DocumentTransformation and implementing an IDocumentTransformation interface.
GUID CATID_DocumentTransformation =
{0xd6313391, 0x6375, 0x4e57, {0x9b, 0x8f, 0xbd, 0x6e, 0x83, 0xfa, 0xf5, 0x01}};