Table of Contents

Class XpmDetails

Namespace
Egami.Formats.Extended.Xpm
Assembly
Egami.Formats.Extended.dll

Details only XPM has, kept in FormatDetails.

public sealed class XpmDetails : FormatDetails
Inheritance
XpmDetails
Inherited Members

Examples

// What the header said that the pixels do not: PcxDetails, SgiDetails, SunRasterDetails, XbmDetails and XpmDetails.
using Raster image = Raster.Load("arrow.xbm", context);
if (image.Metadata.FormatDetails is XbmDetails xbm)
{
    Console.WriteLine($"{xbm.Name}, hotspot {xbm.Hotspot}");
}

// Writers take the name and hotspot back from the details.
image.Metadata.FormatDetails = new XbmDetails { Name = "pointer", Hotspot = new Point(0, 0) };
image.Save("pointer.xbm");

Properties

CharactersPerPixel

Gets or sets the number of characters that name a color in the file.

public int CharactersPerPixel { get; set; }

Property Value

int

Hotspot

Gets or sets the hotspot, the point a cursor points with, or null if the file has none.

public Point? Hotspot { get; set; }

Property Value

Point?

Name

Gets or sets the name of the C array, such as "icon". The writer writes it back.

public string Name { get; set; }

Property Value

string

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.