Method CreateBitmap
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.Core.dll
CreateBitmap(IDeviceContext, SizeInt32, in BitmapProperties)
public static IDeviceBitmap CreateBitmap(this IDeviceContext deviceContext, SizeInt32 size, in BitmapProperties properties)
Parameters
deviceContext
IDeviceContext
size
SizeInt32
properties
BitmapProperties
Returns
- IDeviceBitmap
CreateBitmap(IDeviceContext, SizeInt32, DevicePixelFormat, float, float, BitmapOptions, IDeviceColorContext?)
public static IDeviceBitmap CreateBitmap(this IDeviceContext deviceContext, SizeInt32 size, DevicePixelFormat pixelFormat, float dpiX = 96, float dpiY = 96, BitmapOptions options = BitmapOptions.None, IDeviceColorContext? colorContext = null)
Parameters
deviceContext
IDeviceContext
size
SizeInt32
pixelFormat
DevicePixelFormat
dpiX
float
dpiY
float
options
BitmapOptions
colorContext
IDeviceColorContext
Returns
- IDeviceBitmap
CreateBitmap(IDeviceContext, SizeInt32, void*, int, DxgiFormat, AlphaMode, float, float, BitmapOptions, IDeviceColorContext?)
public static IDeviceBitmap CreateBitmap(this IDeviceContext deviceContext, SizeInt32 size, void* pSrcData, int stride, DxgiFormat format, AlphaMode alphaMode, float dpiX = 96, float dpiY = 96, BitmapOptions options = BitmapOptions.None, IDeviceColorContext? colorContext = null)
Parameters
deviceContext
IDeviceContext
size
SizeInt32
pSrcData
void*
stride
int
format
DxgiFormat
alphaMode
AlphaMode
dpiX
float
dpiY
float
options
BitmapOptions
colorContext
IDeviceColorContext
Returns
- IDeviceBitmap
CreateBitmap(IDeviceContext, SizeInt32, void*, int, DevicePixelFormat, float, float, BitmapOptions, IDeviceColorContext?)
public static IDeviceBitmap CreateBitmap(this IDeviceContext deviceContext, SizeInt32 size, void* pSrcData, int stride, DevicePixelFormat pixelFormat, float dpiX = 96, float dpiY = 96, BitmapOptions options = BitmapOptions.None, IDeviceColorContext? colorContext = null)
Parameters
deviceContext
IDeviceContext
size
SizeInt32
pSrcData
void*
stride
int
pixelFormat
DevicePixelFormat
dpiX
float
dpiY
float
options
BitmapOptions
colorContext
IDeviceColorContext
Returns
- IDeviceBitmap
CreateBitmap(IDeviceContext, SizeInt32, DxgiFormat, AlphaMode, float, float, BitmapOptions, IDeviceColorContext?)
public static IDeviceBitmap CreateBitmap(this IDeviceContext deviceContext, SizeInt32 size, DxgiFormat format, AlphaMode alphaMode, float dpiX = 96, float dpiY = 96, BitmapOptions options = BitmapOptions.None, IDeviceColorContext? colorContext = null)
Parameters
deviceContext
IDeviceContext
size
SizeInt32
format
DxgiFormat
alphaMode
AlphaMode
dpiX
float
dpiY
float
options
BitmapOptions
colorContext
IDeviceColorContext
Returns
- IDeviceBitmap