@rekurt/openkline - v0.2.0
    Preparing search index...

    Function clipToPane

    • Clip the context to an indicator sub-pane band — the building block for a "pane primitive" (an overlay scoped to one sub-pane, e.g. a custom band on the RSI pane). paneIndex is 1..paneCount (top→bottom); 0, an absent pane, or a chart with no sub-panes clips to the main price area instead, so a primitive that asks for a pane that isn't there degrades to the main pane rather than vanishing. Call inside a ctx.save() / ctx.restore() pair.

      A primitive paints in a pane by self-clipping here in its draw and positioning with viewport.indexToX for X and the band's own [top, bottom] for Y (sub-panes have independent Y scales, so use the band bounds — not viewport.priceToY, which maps the main price axis).

      Parameters

      • ctx: CanvasRenderingContext2D
      • layout: ChartLayout
      • paneIndex: number

      Returns void