[]
Contains common functions.
public static class Utils
| Name | Description |
|---|---|
| CopyStream(Stream, Stream) | Copies content of one stream to another. |
| GetDcDpi(IntPtr) | 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) |