fltk.tiled_image
FLTK Tiled Image Class
This module provides the TiledImage class that wraps FLTK's Fl_Tiled_Image. Tiled images repeat a source image to fill an area, useful for backgrounds and patterns.
The TiledImage class provides:
- RAII-based resource management
- Construction from any existing Image
- Automatic tiling to fill specified dimensions
License
BSD-3-ClauseCopyright
Copyright © 2025 DDN (D Developer Network) Members
class TiledImage
Types 1
classTiledImage : Image
Tiled/repeated background image.
TiledImage takes a source image and repeats it to fill an area of specified dimensions. This is useful for creating tiled backgrounds or patterns from a single small image.
Note
The source image must remain valid for the lifetime of the
TiledImage, as the tiled image references (does not copy) it.
Example:
// Create a tiled background from a small pattern
auto pattern = new PngImage("pattern.png");
auto background = new TiledImage(pattern, 800, 600);
// Use background as widget image...Methods
Constructors
Destructors
~thisDestroys the tiled image.