[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.Bitmap.Create

Create Method

Create(RenderTarget, Size2L)

Creates a Direct2D bitmap from a pointer to in-memory source data.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Size2L size)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Size2L size

The dimension of the bitmap to create in pixels.

Returns
Type Description
Bitmap

Create(RenderTarget, Size2L, BitmapProperties)

Creates a Direct2D bitmap from a pointer to in-memory source data.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Size2L size, BitmapProperties bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Size2L size

The dimension of the bitmap to create in pixels.

BitmapProperties bitmapProperties

The pixel format and dots per inch (DPI) of the bitmap to create.

Returns
Type Description
Bitmap

Create(RenderTarget, Size2L, DataPointer, int)

Creates a Direct2D bitmap from a pointer to in-memory source data.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Size2L size, DataPointer dataPointer, int pitch)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Size2L size

The dimension of the bitmap to create in pixels.

DataPointer dataPointer

A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.

int pitch

The byte count of each scanline, which is equal to (the image width in pixels * the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)

Returns
Type Description
Bitmap

Create(RenderTarget, Size2L, DataPointer, int, BitmapProperties)

Creates a Direct2D bitmap from a pointer to in-memory source data.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Size2L size, DataPointer dataPointer, int pitch, BitmapProperties bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Size2L size

The dimension of the bitmap to create in pixels.

DataPointer dataPointer

A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.

int pitch

The byte count of each scanline, which is equal to (the image width in pixels * the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)

BitmapProperties bitmapProperties

The pixel format and dots per inch (DPI) of the bitmap to create.

Returns
Type Description
Bitmap

Create(RenderTarget, Bitmap)

Creates an Bitmap whose data is shared with another resource.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Bitmap bitmap)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Bitmap bitmap

An Bitmap that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.

Returns
Type Description
Bitmap

Create(RenderTarget, Bitmap, BitmapProperties?)

Creates an Bitmap whose data is shared with another resource.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Bitmap bitmap, BitmapProperties? bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Bitmap bitmap

An Bitmap that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.

BitmapProperties? bitmapProperties

The pixel format and DPI of the bitmap to create . The Format portion of the pixel format must match the Format of data or the method will fail, but the alpha modes don't have to match. To prevent a mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are 0.0f, the default DPI, 96, is used.

Returns
Type Description
Bitmap

Create(RenderTarget, Surface)

Creates an Bitmap whose data is shared with another resource.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Surface surface)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Surface surface

An Surface that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.

Returns
Type Description
Bitmap

Create(RenderTarget, Surface, BitmapProperties?)

Creates an Bitmap whose data is shared with another resource.

Declaration
public static Bitmap Create(RenderTarget renderTarget, Surface surface, BitmapProperties? bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

an instance of RenderTarget

Surface surface

An Surface that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.

BitmapProperties? bitmapProperties

The pixel format and DPI of the bitmap to create . The Format portion of the pixel format must match the Format of data or the method will fail, but the alpha modes don't have to match. To prevent a mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are 0.0f, the default DPI, 96, is used.

Returns
Type Description
Bitmap

Create(RenderTarget, BitmapLock, BitmapProperties?)

Creates an Bitmap that points to the bitmap data already stored in the BitmapLock.

Declaration
public static Bitmap Create(RenderTarget renderTarget, BitmapLock bitmapLock, BitmapProperties? bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

An instance of RenderTarget.

BitmapLock bitmapLock

An RenderTarget that contains the data to share with the new Bitmap.

BitmapProperties? bitmapProperties

The pixel format and DPI of the bitmap to create . The Format portion of the pixel format must match the Format of data or the method will fail, but the alpha modes don't have to match. To prevent a mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are 0.0f, the default DPI, 96, is used.

Returns
Type Description
Bitmap

Create(RenderTarget, BitmapSource)

Creates a Bitmap from a wic bitmap.

Declaration
public static Bitmap Create(RenderTarget renderTarget, BitmapSource wicBitmapSource)
Parameters
Type Name Description
RenderTarget renderTarget

The render target.

BitmapSource wicBitmapSource

A reference to a BitmapSource wic bitmap.

Returns
Type Description
Bitmap

Create(RenderTarget, BitmapSource, BitmapProperties)

Creates a Bitmap from a wic bitmap.

Declaration
public static Bitmap Create(RenderTarget renderTarget, BitmapSource wicBitmap, BitmapProperties bitmapProperties)
Parameters
Type Name Description
RenderTarget renderTarget

The render target.

BitmapSource wicBitmap

The wic bitmap.

BitmapProperties bitmapProperties

The bitmap properties.

Returns
Type Description
Bitmap