Bitmap Showcase

bitmap-showcase demonstrates how bitmap rendering behaves when a Bitmap is passed to Buffer::drawBitmap(). It uses a selector panel on the left and a large preview area on the right so different scale modes, color modes, layout options, and style replacements stay easy to compare.

Use This Demo When You Need…

  • A support reference for drawBitmap() and its rendering options.

  • A practical way to compare scale modes, color modes, alignment, cropping, and style replacements.

  • A place to study how bitmap rendering interacts with existing frame grids and Char16Style output.

Run the Demo

Start the demo from the build directory:

$ ./cmake-build-debug/demo-apps/bitmap-showcase

Use the left and right arrow keys to switch pages. Use the up and down arrow keys to move through the variants on the current page. Press Q to quit.

Captured Output (80x25)

╭──────────────────────────────────────────────────────────────────────────────╮
│                        Bitmap Showcase | scale modes                         │
│                                                                              │
│ HalfBlock                ╭───────────────────HalfBlock───────────────────╮ │
│                            │                                               │ │
│ FullBlock                                               │ │
│                            │                                               │ │
│ DoubleBlock                                               │ │
│                            │                    ▗▛▀▀▜▖                     │ │
│ Char16Style                    █    █                     │ │
│                            │                    █    █                     │ │
│                            │                    ▝▙▄▄▟▘                     │ │
│                            │                                               │ │
│                            │                                               │ │
│                            │                                               │ │
│                            │                                               │ │
│                            │                                               │ │
│                            │                                               │ │
│                            │ 2x2 pixels are packed into one terminal cell. │ │
│                            │  Even the empty table entry is drawn, so the  │ │
│                            ╰───────────────────────────────────────────────╯ │
│                                                                              │
│ [←][→] switch pages [↑][↓] switch modes [Q] quit page 1/4                    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Features Demonstrated

  • Buffer::drawBitmap() across HalfBlock, FullBlock, DoubleBlock, and Char16Style output modes.

  • Animated BitmapColorMode variants with ColorSequence.

  • Drawing a bitmap into a rectangle with alignment-dependent cropping.

  • Custom fullBlock(), doubleBlocks(), and halfBlocks() replacements.

  • CharCombinationStyle when a line-based bitmap is drawn over an existing frame grid.

Relevant Source Files

If you want to explore the implementation, start with demo/bitmap-showcase/src/BitmapShowcaseApp.cpp.

This file contains the page layout, sample bitmaps, and the rendering option combinations used by the demo.