Namespace: PdfSharp.Drawing
Defines an object used to draw image files (bmp, png, jpeg, gif) and PDF forms. An abstract base class that provides functionality for the Bitmap and Metafile descended classes.
public class XImage : System.IDisposable
Inheritance Object → XImage
Implements IDisposable
Use either PixelWidth or PointWidth. Temporarily obsolete because of rearrangements for WPF. Currently same as PixelWidth, but will become PointWidth in future releases of PDFsharp.
Gets the width of the image.
public double Width { get; }
Use either PixelHeight or PointHeight. Temporarily obsolete because of rearrangements for WPF. Currently same as PixelHeight, but will become PointHeight in future releases of PDFsharp.
Gets the height of the image.
public double Height { get; }
Gets the width of the image in point.
public double PointWidth { get; }
Gets the height of the image in point.
public double PointHeight { get; }
Gets the width of the image in pixels.
public int PixelWidth { get; }
Gets the height of the image in pixels.
public int PixelHeight { get; }
Gets the size in point of the image.
public XSize Size { get; }
Gets the horizontal resolution of the image.
public double HorizontalResolution { get; }
Gets the vertical resolution of the image.
public double VerticalResolution { get; }
Gets or sets a flag indicating whether image interpolation is to be performed.
public bool Interpolate { get; set; }
Gets the format of the image.
public XImageFormat Format { get; }
Creates an image from the specified file.
public static XImage FromFile(string path)
path
String
The path to a BMP, PNG, JPEG, or PDF file.
Creates an image from the specified stream.
public static XImage FromStream(Stream stream)
stream
Stream
The stream containing a BMP, PNG, JPEG, or PDF file.
THHO4THHO Internal test code.
Creates an image.
internal static XImage FromImportedImage(ImportedImage image)
image
ImportedImage
The imported image.
Tests if a file exist. Supports PDF files with page number suffix.
public static bool ExistsFile(string path)
path
String
The path to a BMP, PNG, GIF, JPEG, TIFF, or PDF file.
internal void Initialize()
Under construction
public void Dispose()
Disposes underlying GDI+ object.
protected void Dispose(bool disposing)
disposing
Boolean
internal void AssociateWithGraphics(XGraphics gfx)
gfx
XGraphics
internal void DisassociateWithGraphics()
internal void DisassociateWithGraphics(XGraphics gfx)
gfx
XGraphics