X-Git-Url: https://git-public.kairo.at/?a=blobdiff_plain;f=xulapp%2Fchrome%2Fmandelbrot%2Fcontent%2Fmandelbrot.js;h=7762362591c4664798a8f9344df9865b91d59fae;hb=6403d662069799da869e77b1a426a29ccbc85a44;hp=e3c36ae00e8278d53e33b4645f6f7c1b45ce176c;hpb=740b86d148283d0cb4a66df542d081ab89278279;p=mandelbrot.git diff --git a/xulapp/chrome/mandelbrot/content/mandelbrot.js b/xulapp/chrome/mandelbrot/content/mandelbrot.js index e3c36ae..7762362 100644 --- a/xulapp/chrome/mandelbrot/content/mandelbrot.js +++ b/xulapp/chrome/mandelbrot/content/mandelbrot.js @@ -69,10 +69,20 @@ function drawImage() { function drawLine(line, canvas, context, iterMax, algorithm) { let Cr_min = -2.0; let Cr_max = 1.0; + try { + Cr_min = gPref.getCharPref("mandelbrot.last_image.Cr_min"); + Cr_max = gPref.getCharPref("mandelbrot.last_image.Cr_max"); + } + catch (e) { } let Cr_scale = Cr_max - Cr_min; let Ci_min = -1.5; let Ci_max = 1.5; + try { + Cr_min = gPref.getCharPref("mandelbrot.last_image.Ci_min"); + Cr_max = gPref.getCharPref("mandelbrot.last_image.Ci_max"); + } + catch (e) { } let Ci_scale = Ci_max - Ci_min; let pixels = []; @@ -363,6 +373,10 @@ function setPalette(aPaletteID) { gColorPalette = getColorPalette(aPaletteID); } +function imgSettings() { + window.openDialog("chrome://mandelbrot/content/image-settings.xul"); +} + function updateDebugMenu() { var jitMenuItem = document.getElementById("jitEnabled"); jitMenuItem.setAttribute("checked", gPref.getBoolPref("javascript.options.jit.chrome")); @@ -403,7 +417,6 @@ function setAlgorithm(algoID) { gPref.setCharPref("mandelbrot.use_algorithm", algoID); } - /***** helper functions from external sources *****/ // function below is based on http://developer.mozilla.org/en/docs/Code_snippets:Canvas