[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.Bitmap1

Class Bitmap1

Namespace
GrapeCity.Documents.DX.Direct2D
Assembly
GcDocs.DX.Windows.dll

ID2D1Bitmap1

[Guid("a898a84c-3873-4588-b08b-ebbf978df041")]
public class Bitmap1 : Bitmap, IDisposable, IUnknown
Inheritance
object
Bitmap1
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Bitmap1(IntPtr)

Initializes a new instance of the Bitmap1 class.

public Bitmap1(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

Create(DeviceContext, Surface, BitmapProperties1)

Creates an Bitmap whose data is shared with another resource.

public static Bitmap1 Create(DeviceContext deviceContext, Surface surface, BitmapProperties1 bitmapProperties)

Parameters

deviceContext DeviceContext

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 BitmapProperties1

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

Bitmap1

Create(DeviceContext, Surface)

Creates an Bitmap whose data is shared with another resource.

public static Bitmap1 Create(DeviceContext deviceContext, Surface surface)

Parameters

deviceContext DeviceContext

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

Bitmap1

Create(DeviceContext, Size2L, DataStream, int, BitmapProperties1)

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

public static Bitmap1 Create(DeviceContext deviceContext, Size2L size, DataStream dataStream, int pitch, BitmapProperties1 bitmapProperties)

Parameters

deviceContext DeviceContext

an instance of RenderTarget

size Size2L

The dimension of the bitmap to create in pixels.

dataStream DataStream

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

pitch int

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 BitmapProperties1

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

Returns

Bitmap1

Create(DeviceContext, Size2L, DataStream, int)

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

public static Bitmap1 Create(DeviceContext deviceContext, Size2L size, DataStream dataStream, int pitch)

Parameters

deviceContext DeviceContext

an instance of RenderTarget

size Size2L

The dimension of the bitmap to create in pixels.

dataStream DataStream

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

pitch int

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

Bitmap1

Create(DeviceContext, Size2L, BitmapProperties1)

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

public static Bitmap1 Create(DeviceContext deviceContext, Size2L size, BitmapProperties1 bitmapProperties)

Parameters

deviceContext DeviceContext

an instance of RenderTarget

size Size2L

The dimension of the bitmap to create in pixels.

bitmapProperties BitmapProperties1

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

Returns

Bitmap1

Create(DeviceContext, Size2L)

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

public static Bitmap1 Create(DeviceContext deviceContext, Size2L size)

Parameters

deviceContext DeviceContext

an instance of RenderTarget

size Size2L

The dimension of the bitmap to create in pixels.

Returns

Bitmap1

Create(DeviceContext, BitmapSource, BitmapProperties1)

Creates a Bitmap from a wic bitmap.

public static Bitmap1 Create(DeviceContext deviceContext, BitmapSource wicBitmap, BitmapProperties1 bitmapProperties)

Parameters

deviceContext DeviceContext

The render target.

wicBitmap BitmapSource

The wic bitmap.

bitmapProperties BitmapProperties1

The bitmap properties.

Returns

Bitmap1

Create(DeviceContext, BitmapSource)

Creates a Bitmap from a wic bitmap.

public static Bitmap1 Create(DeviceContext deviceContext, BitmapSource wicBitmapSource)

Parameters

deviceContext DeviceContext

The render target.

wicBitmapSource BitmapSource

A reference to a BitmapSource wic bitmap.

Returns

Bitmap1

GetColorContext()

void ID2D1Bitmap1::GetColorContext([Out, Optional] ID2D1ColorContext** colorContext)

public ColorContext GetColorContext()

Returns

ColorContext

GetOptions()

D2D1_BITMAP_OPTIONS ID2D1Bitmap1::GetOptions()

public BitmapOptions GetOptions()

Returns

BitmapOptions

GetSurface()

HRESULT ID2D1Bitmap1::GetSurface([Out, Optional] IDXGISurface** dxgiSurface)

public Surface GetSurface()

Returns

Surface

Map(MapOptions, out MappedRectangle)

HRESULT ID2D1Bitmap1::Map([In] D2D1_MAP_OPTIONS options,[Out] D2D1_MAPPED_RECT* mappedRect)

public void Map(MapOptions options, out MappedRectangle mappedRect)

Parameters

options MapOptions
mappedRect MappedRectangle

Map(MapOptions)

Maps the given bitmap into memory.

public DataRectangle Map(MapOptions options)

Parameters

options MapOptions

The options used in mapping the bitmap into memory.

Returns

DataRectangle

a reference to the rectangle that is mapped into memory

Remarks

The bitmap must have been created with the Read flag specified. The caller should try to unmap the memory as quickly as is feasable to release occupied DMA aperture memory.

Unmap()

HRESULT ID2D1Bitmap1::Unmap()

public void Unmap()

Operators

explicit operator Bitmap1(IntPtr)

Performs an explicit conversion from System.IntPtr to Bitmap1.

public static explicit operator Bitmap1(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Bitmap1