IVisualTreeService2::RenderTargetBitmap method (xamlom.h)
Returns an image that represents the object described by handle, or returns an error if the object does not have or cannot provide such an image.
Syntax
HRESULT RenderTargetBitmap(
[in] InstanceHandle handle,
[in] RenderTargetBitmapOptions options,
[in] unsigned int maxPixelWidth,
[in] unsigned int maxPixelHeight,
[out] IBitmapData **ppBitmapData
);
Parameters
[in] handle
The handle associated with the visual for which the caller is requesting a bitmap.
[in] options
A flag that specifies whether only the texture associated with the visual should be rendered, or whether the texture and its children should be rendered.
[in] maxPixelWidth
The maximum width, in pixels, of the returned bitmap.
[in] maxPixelHeight
The maximum height, in pixels, of the returned bitmap.
[out] ppBitmapData
The structure containing the requested bitmap information as well as information pertaining to that bitmap.
Return value
The possible return codes include, but are not limited to, the values shown in the following table.
Return code | Description |
---|---|
|
The method succeeded. ppBitmapData will be set to an IBitmapData containing an image. |
|
The image could not be acquired or converted. ppBitmapData will be set to NULL. |
|
handle does not refer to an object that can return an image, the options value is invalid, or ppBitmapData is NULL. |
Remarks
The returned image will have
- Format: DXGI_FORMAT_B8G8R8A8_UNORM
- AlphaMode: DXGI_ALPHA_MODE_PREMULTIPLIED
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | xamlom.h |