[]
        
(Showing Draft Content)

C1.Win.Document.Utils

Utils Class

Contains common functions.

Inheritance
Utils
Namespace: C1.Win.Document
Assembly: C1.Win.Document.8.dll
Syntax
public static class Utils

Methods

Name Description
CopyStream(Stream, Stream)

Copies content of one stream to another.

GetDcDpi(nint)

Gets the resolution for the specified device context.

IImageFromObjectWin(object)

Converts an object to a GrapeCity.Documents.Drawing.IImage instance if possible.

ReadMetafileFromMemory(byte[])

Reads a Metafile from a byte array.

SamePaperSizes(Size, Size)

Tests two sizes for equality allowing a small margin for rounding errors.

Swap<T>(ref T, ref T)

Swaps two values.

ToC1UtilFont(Font)
ToSysImage(IImage)
ToSystemFont(Font)
TryColorFromString(string, CultureInfo, out Color)

This method is based on ColorConverter.ConvertFrom(...) method from WinForms.

WriteImageToFile(Image, ImageFormat, string)

Writes specified image to file.

WriteImageToStream(Image, ImageFormat, Stream)

Writes specified image to stream.

WriteMetafileToFile(Metafile, string)

Serializes a Metafile to a disk file.

WriteMetafileToMemory(Metafile)

Writes a Metafile to a byte array.

WriteMetafileToStream(Metafile, Stream)

Serializes a Metafile to a Stream.