Frame Color Animations
frame-color-animations demonstrates the animated color modes of FrameDrawOptions. Several frame styles are
rendered side by side so you can compare one-color, striped, diagonal, and chasing-border animation modes in one
screen.
Use This Demo When You Need…
A support example for animated frame borders or panel fills.
A quick comparison of the available
FrameColorModebehaviors.A reference for combining one retained
Bufferwith color sequences and a lightweight render loop.
Run the Demo
Start the demo from the build directory:
$ ./cmake-build-debug/demo-apps/frame-color-animations
Press Q to quit.
Captured Output (80x25)
╭──────────────────────────────────────────────────────────────────────────────╮ │ Frame Color Animations │ │ │ │ This is a demo of various frame animation modes. │ │ │ │ ╭───────────────╮ ┌───────────────┐ ┏━━━━━━━━━━━━━━━┓ ╔═══════════════╗ │ │ │ OneColor │ │ Vertical │ ┃ Horizontal ┃ ║ Forward ║ │ │ │ │ │ │ ┃ ┃ ║ ║ │ │ │ animated │ │ animated │ ┃ animated ┃ ║ animated ║ │ │ │ │ │ │ ┃ ┃ ║ ║ │ │ │ │ │ │ ┃ ┃ ║ ║ │ │ │ │ │ │ ┃ ┃ ║ ║ │ │ ╰───────────────╯ └───────────────┘ ┗━━━━━━━━━━━━━━━┛ ╚═══════════════╝ │ │ ▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜ ┏━━━━━━━━━━━━━━━┓ ╭───────────────╮ │ │ ▌ Backward ▐ ┃ Chasing ┃ │ Chasing │ │ │ ▌ ▐ ┃ ┃ │ │ │ │ ▌ animated ▐ ┃ animated ┃ │ animated │ │ │ ▌ ▐ ┃ ┃ │ │ │ │ ▌ ▐ ┃ ┃ │ │ │ │ ▌ ▐ ┃ ┃ │ │ │ │ ▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟ ┗━━━━━━━━━━━━━━━┛ ╰───────────────╯ │ │ │ │ Press q to quit. │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯
Features Demonstrated
FrameDrawOptions::setFrameColorSequence()with severalFrameColorModevalues.Animated outer frames combined with animated fill colors.
A side-by-side comparison of multiple
FrameStylevalues.Simple full-screen rendering with one persistent
Buffer.
Relevant Source Files
If you want to explore the implementation, start with demo/frame-color-animations/src/FrameColorAnimationsApp.cpp.
This file contains the animation loop, panel layout, and color sequences for each frame mode.