Fractal Generator for android Bitmap / Canvas

I want to create a fractal generator for Android.

The only confusing thing I have on my list is which class should I use to display the result on the screen? I need to have something like a bitmap to be able to get the current width / height and be able to set some pixels (RGB) without having another object for each pixel.

I've seen that I can use the Bitmap class, but I'm not sure if that's the right way.

As an additional option, I also want to be able to generate a screen in the background and save the result to a file.

Which class should I use for this?


source to share

1 answer

You can use canvas.drawPoint()


To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the drawing).

For reference:,%20float,



All Articles