| Previous | Next |
| ERROR_METAFILE_NOT_SUPPORTED | ERROR_CLIPPING_NOT_SUPPORTED |
ERROR_TRANSFORM_NOT_SUPPORTED
The requested transformation operation is unsupported.
ERROR_TRANSFORM_NOT_SUPPORTED is Win32 error 2004 (0x7D4). GDI transformations depend on graphics mode, mapping mode, destination technology, driver support, and whether drawing is direct, recorded, or played back. The error means the requested transform cannot be represented or executed in the current path.
Typical unsupported transform cases
- world transforms are requested while the DC remains in
GM_COMPATIBLEinstead ofGM_ADVANCED - the matrix is singular, contains non-finite values, or exceeds useful device-coordinate limits
- a printer, metafile conversion, or compatibility driver cannot implement rotation, shear, or reflection as requested
- code mixes mapping-mode viewport/window transforms with cached assumptions about world-transform order
- an EMF/WMF playback or export path cannot preserve a transform supported during normal display rendering
Transform evidence
Log the failing GDI API, DC technology and driver, graphics and mapping modes, full XFORM matrix, viewport/window extents and origins, source bounds, destination bounds, metafile status, and preceding transform calls. Check values for NaN, infinity, zero determinant, and extreme scale. Include the operation order because matrix composition is not commutative.
Diagnostic sequence
Query the live graphics mode and current world transform. Reproduce with an identity matrix, then translation, scale, rotation, shear, and reflection separately to identify the unsupported component. Test a display DC and the real output DC; success on screen does not prove printer support.
Verify that SetGraphicsMode succeeded before SetWorldTransform or ModifyWorldTransform. For export or metafile playback, inspect whether the target format can encode the operation and whether a raster fallback is acceptable.
Recovery
Enable the required graphics mode, correct the matrix, or pre-transform geometry in application code. When a device cannot perform the transform, render into an intermediate bitmap at controlled resolution or choose a simpler transform supported by the destination.
Keep transform state scoped with SaveDC/RestoreDC, validate matrices before GDI calls, and exercise real printer/remote drivers in tests. Report the matrix and destination capability rather than only an export error.
Difference from clipping not supported
ERROR_CLIPPING_NOT_SUPPORTED concerns restricting the drawable region. Error 2004 concerns coordinate transformation; either may arise in metafile or driver paths, but they require different state inspection.
Example
A print preview rotates labels successfully on screen, but the printer driver rejects the sheared world transform with 2004. Pre-transforming the vector coordinates or rasterizing that label for the printer preserves output without changing the display path.
References
- Microsoft: System Error Codes (1700–3999)
- Microsoft: Win32 Error Codes in MS-ERREF
- Microsoft: SetWorldTransform
- Microsoft: World-space transformations
Looking for a different code? Search another status or error code.
