Coursereader API - v0.1.0
    Preparing search index...

    Function createToneFilter

    • A standalone filter applying the tone treatment — grayscale, seeded dither and the tone table — to arbitrary content. Applications can use it as a global overlay so surrounding chrome receives the same reduction as the scanned pages.

      Parameters

      • settings: ScanSettings

        Scan settings providing the tone treatment.

      • seed: string | number

        Seed for deterministic dither noise.

      • id: string

        Unique id for the generated SVG filter.

      Returns SVGSVGElement

      A zero-sized SVG element containing the filter.

      const page = createCourseReaderPage("#document");

      document.body.append(
      createToneFilter(page.settings, 1971, "global-tone-filter"),
      );