package miaou-widgets-display-sdl

  1. Overview
  2. Docs
Miaou SDL widget implementations

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.5.2.tar.gz
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6

doc/miaou-widgets-display-sdl.widgets/Miaou_widgets_display_sdl/Sparkline_widget_sdl/index.html

Module Miaou_widgets_display_sdl.Sparkline_widget_sdlSource

SDL-enhanced sparkline widget with smooth vector rendering.

This module provides SDL-optimized rendering for sparklines with:

  • Smooth anti-aliased lines
  • Filled area under the curve
  • Gradient support
  • Higher precision than character-based rendering
Sourcetype sdl_render_info = {
  1. renderer : Tsdl.Sdl.renderer;
  2. x : int;
    (*

    Top-left X position in pixels

    *)
  3. y : int;
    (*

    Top-left Y position in pixels

    *)
  4. width : int;
    (*

    Width in character cells

    *)
  5. height : int;
    (*

    Height in character cells

    *)
  6. char_w : int;
    (*

    Character cell width in pixels

    *)
  7. char_h : int;
    (*

    Character cell height in pixels

    *)
}

SDL rendering context information

Sourceval render_sdl : sdl_render_info -> Miaou_widgets_display.Sparkline_widget.t -> focus:bool -> show_value:bool -> ?color:string -> ?thresholds:Miaou_widgets_display.Sparkline_widget.threshold list -> unit -> unit

Render sparkline directly to SDL renderer with enhanced graphics.

  • info SDL rendering context
  • focus Whether to highlight (currently has minimal effect in SDL mode)
  • show_value If true, value display handled separately (not rendered here)
  • color Optional ANSI color code for the sparkline
  • thresholds Optional thresholds for coloring segments
Sourceval render : Miaou_widgets_display.Sparkline_widget.t -> focus:bool -> show_value:bool -> ?color:string -> ?thresholds:Miaou_widgets_display.Sparkline_widget.threshold list -> unit -> string

Fallback to text-based rendering for terminal mode. Returns the rendered sparkline as a string.

Sourceval render_with_label : Miaou_widgets_display.Sparkline_widget.t -> label:string -> focus:bool -> ?color:string -> ?thresholds:Miaou_widgets_display.Sparkline_widget.threshold list -> unit -> string

Render with a label prefix (text mode only).