package miaou-widgets-display-sdl

  1. Overview
  2. Docs

Module Miaou_widgets_display_sdl.Line_chart_widget_sdlSource

SDL-enhanced line chart widget with smooth anti-aliased rendering.

This module provides SDL-optimized rendering for line charts with:

  • Smooth vector lines with anti-aliasing
  • Filled areas under curves with transparency
  • Precise pixel-level rendering
  • Smooth grid lines and axes
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.Line_chart_widget.t -> show_axes:bool -> show_grid:bool -> ?thresholds:Miaou_widgets_display.Line_chart_widget.threshold list -> unit -> unit

Render line chart directly to SDL renderer with enhanced graphics.

  • info SDL rendering context
  • show_axes Whether to draw axes
  • show_grid Whether to draw background grid lines
  • thresholds Optional thresholds for coloring points/lines
Sourceval render : Miaou_widgets_display.Line_chart_widget.t -> show_axes:bool -> show_grid:bool -> ?thresholds:Miaou_widgets_display.Line_chart_widget.threshold list -> unit -> string

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