diff options
| author | Vito Caputo <vcaputo@pengaru.com> | 2025-11-05 21:15:53 -0800 |
|---|---|---|
| committer | Vito Caputo <vcaputo@pengaru.com> | 2025-11-05 23:45:38 -0800 |
| commit | 19bd3dd8a6ce18b54cfcea69a0724fe9da8a7543 (patch) | |
| tree | c1f64a2c0f90e37158cc2a4bede603bcdde63548 /src/vcr.h | |
| parent | 766710c1d5a8c02ed625b7dc36c6c948eb020fd0 (diff) | |
vcr: add flags for vcr_draw_text()
The current code assumes clipping text to the backend's
bounds.
I'd like to enable sticking text in the graph layers, which
really needs to support wrapping to Just Work, because of how the
graph layers are unwrapped @ present to keep the incremental
rendering of the graphs efficient.
So here let's treat the existing code as the clipped mode.
Future commits will implement the wrapped mode.
Diffstat (limited to 'src/vcr.h')
| -rw-r--r-- | src/vcr.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -44,6 +44,11 @@ typedef enum vcr_bar_base_t { VCR_BAR_BASE_CNT } vcr_bar_base_t; +typedef enum vcr_text_flags_t { + VCR_TEXT_FLAGS_CLIPPED, + VCR_TEXT_FLAGS_CNT +} vcr_text_flags_t; + typedef struct vcr_backend_t vcr_backend_t; typedef struct vcr_dest_t vcr_dest_t; typedef struct vcr_t vcr_t; @@ -72,7 +77,7 @@ vcr_dest_t * vcr_dest_free(vcr_dest_t *dest); vcr_t * vcr_new(vcr_backend_t *vbe, int *hierarchy_end_ptr, int *snowflakes_cnt_ptr, const unsigned *marker_distance_ptr); vcr_t * vcr_free(vcr_t *vcr); int vcr_resize_visible(vcr_t *vcr, int width, int height); -void vcr_draw_text(vcr_t *vcr, vcr_layer_t layer, int x, int row, const vcr_str_t *strs, int n_strs, int *res_width); +void vcr_draw_text(vcr_t *vcr, vcr_layer_t layer, vcr_text_flags_t flags, int x, int row, const vcr_str_t *strs, int n_strs, int *res_width); void vcr_draw_ortho_line(vcr_t *vcr, vcr_layer_t layer, int x1, int y1, int x2, int y2); void vcr_mark_finish_line(vcr_t *vcr, vcr_layer_t layer, int row); void vcr_draw_bar(vcr_t *vcr, vcr_layer_t layer, vcr_bar_base_t base, int row, int height); |
