[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.Windows.GcD2DBitmap

GcD2DBitmap Class

Represents a bitmap that uses the Direct2D system API. Can be used for fast and efficient rendering on Windows systems that support Direct2D.

Inheritance
GcD2DBitmap
Implements
Namespace: GrapeCity.Documents.Imaging.Windows
Assembly: DS.Documents.Imaging.Windows.dll
Syntax
public class GcD2DBitmap : IImage, IDisposable
Public Class GcD2DBitmap
    Implements IImage, IDisposable

Constructors

Name Description
GcD2DBitmap()

Initializes a new instance of the GcD2DBitmap class.

GcD2DBitmap(int, int, float, float)

Initializes a new instance of the GcD2DBitmap class and creates the image.

The image content is not initialized and can contain any random data.

Properties

Name Description
D2DDevice

Gets an instance of the GrapeCity.Documents.DX.Direct2D.Device class.

D2DFactory

Gets an instance of the GrapeCity.Documents.DX.Direct2D.Factory1 class.

DWFactory

Gets an instance of the GrapeCity.Documents.DX.DirectWrite.Factory1 class.

The factory becomes available after initializing the font cache (see the SetFontCache(FontCache) method).

DeviceContext

Gets an instance of the GrapeCity.Documents.DX.Direct2D.DeviceContext class.

DpiX

Gets the x-axis DPI resolution.

DpiY

Gets the y-axis DPI resolution.

Graphics

Gets an instance of the GcD2DBitmapGraphics class.

The Graphics becomes available after executing the CreateGraphics(Color?) method.

Height

Gets the height of the image, in DIPs.

IsDisposed

Gets a value indicating whether the GcD2DBitmap has been disposed of.

PixelHeight

Gets the pixel height of the image.

PixelWidth

Gets the pixel width of the image.

Width

Gets the width of the image, in DIPs.

Methods

Name Description
ApplyLicenseKey(string)

Applies a license key to an instance of GcWicBitmap.

CreateGraphics(Color?)

Creates an instance of the GcD2DBitmapGraphics class.

CreateImage(int, int)

Creates an image with the given size and 96 DPI resolution.

CreateImage(int, int, float, float)

Creates an image with the given size and resolution.

The content is not initialized by this method and can contain any random data.

DiscardImage()

Discards the internal image and clears all metadata.

Dispose()

Cleans up the resources that were used.

Dispose(bool)

Performs cleanup operations on managed and unmanaged resources.

Load(Stream, WicContainerFormat, int)

Loads the image from a stream.

Load(string, WicContainerFormat, int)

Loads the image from a file.

Save(Stream, WicContainerFormat, BaseOptions)

Saves the image to a stream using the specified format and options.

Save(string, WicContainerFormat, BaseOptions)

Saves the image to a file using the specified format and options.

SaveAsBmp(Stream, BmpOptions)

Saves the image to a stream in BMP format.

SaveAsBmp(string, BmpOptions)

Saves the image to a file in BMP format.

SaveAsGif(Stream, GifOptions)

Saves the image to a stream in GIF format.

SaveAsGif(string, GifOptions)

Saves the image to a file in GIF format.

SaveAsJpeg(Stream, JpegOptions)

Saves the image to a stream in JPEG format.

SaveAsJpeg(string, JpegOptions)

Saves the image to a file in JPEG format.

SaveAsJpegXR(Stream, JpegXROptions)

Saves the image to a stream in JPEG XR format.

SaveAsJpegXR(string, JpegXROptions)

Saves the image to a file in JPEG XR format.

SaveAsPng(Stream, PngOptions)

Saves the image to a stream in PNG format.

SaveAsPng(string, PngOptions)

Saves the image to a file in PNG format.

SaveAsTiff(Stream, TiffOptions)

Saves the image to a stream in TIFF format.

SaveAsTiff(string, TiffOptions)

Saves the image to a file in TIFF format.

SetFontCache(FontCache)

Assigns a shared instance of the GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.FontCache class to be used by this bitmap.

SetLicenseKey(string)

Sets the license key.

ToGcBitmap()

Copies the image buffer to a new GcBitmap.

ToGcBitmap(GcBitmap)

Copies the image buffer to an existing instance of GcBitmap.