@prachwal/mandelbrot-generator - v1.1.1
    Preparing search index...

    Function saveImageAsSVG

    • Saves a Mandelbrot fractal as an SVG file to the output directory

      This function generates the fractal and writes it directly to a file in the project's output folder. It automatically creates the output directory if needed.

      Parameters

      • config: MandelbrotConfig

        Complete fractal generation configuration

      • filename: string

        Name of the output file (will be converted to .svg)

      Returns string

      Absolute path to the saved SVG file

      import { saveImageAsSVG, defaultConfig } from '@prachwal/mandelbrot-generator';

      const filePath = saveImageAsSVG({
      ...defaultConfig,
      width: 1200,
      height: 800,
      maxIterations: 256
      }, 'my-fractal.svg');

      console.log(`Fractal saved to: ${filePath}`);

      generateMandelbrotSVG for generating SVG content without saving

      1.0.0