fltk.images.ximage

FLTK XBM and XPM Image Classes

This module provides classes for loading X bitmap format images:

  • XbmImage: Monochrome X bitmap images loaded from files
  • XpmImage: Color X pixmap images loaded from files

These differ from Bitmap and Pixmap classes in that they load from files rather than from in-memory data.

Authors

Dejan Lekić

License

BSD-3-Clause

Types 2

Monochrome X bitmap image loaded from a file.

XbmImage loads images in X BitMap format from files. XBM is a monochrome (1-bit) image format commonly used for icons and cursors in X Window System applications.

Example:

auto img = new XbmImage("icon.xbm");
if (img.isValid) {
   writefln("Loaded %dx%d XBM image", img.width, img.height);
}

Fields
FltkXbmImage _xbmHandle
Methods
FltkXbmImage xbmHandle() @safe nothrow @nogcReturns the underlying XBM image handle.
bool isValid() const @safe nothrow @nogcChecks if the XBM image loaded successfully.
int fail() const nothrow @nogcGets the error status of the image load.
Constructors
this(string filename)Loads an XBM image from a file.
Destructors
~thisDestroys the XBM image and releases resources.

Color X pixmap image loaded from a file.

XpmImage loads images in X PixMap format from files. XPM is a text-based color image format that supports transparency, commonly used for icons in X Window System applications.

Example:

auto img = new XpmImage("icon.xpm");
if (img.isValid) {
   writefln("Loaded %dx%d XPM image", img.width, img.height);
}

Fields
FltkXpmImage _xpmHandle
Methods
FltkXpmImage xpmHandle() @safe nothrow @nogcReturns the underlying XPM image handle.
bool isValid() const @safe nothrow @nogcChecks if the XPM image loaded successfully.
int fail() const nothrow @nogcGets the error status of the image load.
Constructors
this(string filename)Loads an XPM image from a file.
Destructors
~thisDestroys the XPM image and releases resources.