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
Block16Styleoutput.
Run the Demo
Start the demo from the build directory:
$ ./cmake-build-debug/demo-apps/cterm/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 │ │ │
│ │ ▗▛▀▀▜▖ │ │
│ Block16Style │ █ █ │ │
│ │ █ █ │ │
│ │ ▝▙▄▄▟▘ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ 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()acrossHalfBlock,FullBlock,DoubleBlock, andBlock16Styleoutput modes.Animated
BitmapColorModevariants withColorSequence.Drawing a bitmap into a rectangle with alignment-dependent cropping.
Custom
fullBlock(),doubleBlocks(), andhalfBlocks()replacements.BlockCombinationStylewhen a line-based bitmap is drawn over an existing frame grid.
Relevant Source Files
If you want to explore the implementation, start with demos/cterm/BitmapShowcase/src/BitmapShowcaseApp.cpp.
This file contains the page layout, sample bitmaps, and the rendering option combinations used by the demo.