Click or drag to resize
AB4D logo

DXViewRenderToBitmap(Int32, Int32, Int32, Int32, Double, Double, Boolean) Method

RenderToBitmap renders the 3D scene to bitmap with specified width, height, multi-sampling and super-sampling count and DPI. See also other overrides of RenderToBitmap method: RenderToBitmap, RenderToBitmap(Int32, Int32, Int32, Int32, Boolean), RenderToBitmap(Int32, Int32, Int32, Double, Double), RenderToBitmap(WriteableBitmap, Int32, Int32).

Namespace: Ab3d.DirectX.Controls
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.1.9105.2048
Syntax
C#
public BitmapSource RenderToBitmap(
	int width,
	int height,
	int preferedMultisampling,
	int supersamplingCount,
	double dpiX,
	double dpiY,
	bool convertToNonPreMultipledAlpha = false
)

Parameters

width  Int32
width of the rendered bitmap
height  Int32
height of the rendered bitmap
preferedMultisampling  Int32
multi-sampling count that is used to render the image (used if possible). When -1 is specified (by default), then the current multi-sampling count from DXScene is used.
supersamplingCount  Int32
super-sampling count (possible values: 1 no super-sampling, 4, 16, 64)
dpiX  Double
The horizontal DPI of the bitmap.
dpiY  Double
The vertical DPI of the bitmap.
convertToNonPreMultipledAlpha  Boolean  (Optional)
when true (false by default) then the image in converted into non-premultiplied alpha (this can be used when saving to png file that does not support pre-multiplied alpha)

Return Value

BitmapSource
BitmapSource as rendered the 3D scene
See Also