connornishijima / Pixie_Chroma

Arduino library and documentation for Pixie Chroma displays!
https://lixielabs.com/chroma/
MIT License
53 stars 9 forks source link

Add justify(justification, row = 0) function #46

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago

Add justify(justification, row = 0) function

This allows (already printed) rows to be justified LEFT, RIGHT, or to the CENTER

before a call to show() by studying the existing mask for its maximum left

and right "extents".

Anything unable to be perfectly centered (odd length strings) will always bias left.

Usage:

print("TEST");

justify(CENTER); // Mask centered here

show();

https://github.com/connornishijima/Pixie_Chroma/blob/025cfb6da2e729919040ea9001054fa3cd990bd3/src/pixie_chroma_internal.h#L26


//     print( "GREEN " );   
//     print( "color!" ); // Prints in green

// TODO: Add justify(justification, row = 0) function
// This allows (already printed) rows to be justified LEFT, RIGHT, or to the CENTER
// before a call to show() by studying the existing mask for its maximum left
// and right "extents".
// 
// Anything unable to be perfectly centered (odd length strings) will always bias left.
// 
// Usage:
//     print("TEST");
//     justify(CENTER); // Mask centered here
//     show();

/*! Modes for updating Pixie Chroma displays */
enum t_update_mode {
    AUTOMATIC, /*!< Will call show() at a specified FPS using an ISR */

46a7482a6f576156ea1070b407180f46b466c824

github-actions[bot] commented 2 years ago

Closed in 997983e3a8dcdce9c43881eb443e9d35eb4d6b72