Program Listing for File mandelbrotanimation.h

Return to documentation for file (src/animation/mandelbrotanimation.h)

/*
 * Mandelbrot - Draws a Mandlebrot fractal.
 * Core logic provided by Joni Salonen's C fractal library: https://github.com/joni/fractals/
 */

#ifndef MANDELBROTANIMATION_H
#define MANDELBROTANIMATION_H

#include "animation.h"

namespace PixelMaestro {
    class MandelbrotAnimation : public Animation {
        public:
            explicit MandelbrotAnimation(Section& section);
            ~MandelbrotAnimation() = default;
            void set_palette(const Colors::RGB colors[], uint8_t num_colors);
            void update();

        private:
            uint8_t iterations_ = 0;

            uint8_t max_iterations_ = 10;

            void map();
    };
}

#endif // MANDELBROTANIMATION_H