{
float * pixels;
Complex * z;
- int width, height;
+ int width, height;
void Allocate(int w, int h)
{
float * buf;
bool got = false;
bufferPos = y * w;
- buf = buffer + bufferPos;
+ buf = buffer + bufferPos;
for( x = 0; x < w/* && !terminate*/; x++)
{
/*int n;
if(minY == MAXINT) minY = y;
maxY = y;
}
- if(!julia)
+ if(!julia)
{
C.a = C0.a;
C.b += delta;
Mutex mutex {};
Fractal fractal;
bool terminate;
-
+
int depth, maxDepth;
unsigned int Main()
}
for(t = 0; t < numThreads; t++)
threads[t].done.Wait();
- mutex.Release();
+ mutex.Release();
app.Lock();
{
thread.range = 3;
if(thread.exponent == 2)
- thread.center = { -0.75, 0 };
+ thread.center = { -0.75, 0 };
else
- thread.center = { 0, 0 };
+ thread.center = { 0, 0 };
}
params.UpdateControls();
Render(true);
Size imageSize { 400, 400 };
scrollArea = imageSize;
Bitmap image {};
-
+
bool selecting;
bool OnLeftButtonDown(int x, int y, Modifiers mods)
else
{
if(mods.ctrl)
- params.depthScroll.thumbPosition =
+ params.depthScroll.thumbPosition =
(int)((double)x / (double)clientSize.w * (double)(params.depthScroll.range - 1));
if(mods.shift)
params.loop.thumbPosition = (int)((double)y / (double)clientSize.h * 512);
bool OnCreate()
{
- Render(true);
+ //Render(true);
params.UpdateControls();
return true;
}
return true;
}
};
- EditBox exponent
+ EditBox exponent
{
parent = this, text = "Exponent", position = Point { 16, 88 };
return true;
}
};
- EditBox iterations
+ EditBox iterations
{
parent = this, text = "Iterations", position = Point { 104, 88 };
return true;
}
};
- ScrollBar depthScroll
+ ScrollBar depthScroll
{
parent = this, text = "scrollBar1", size = Size { 172, 16 }, position = Point { 16, 120 };
}
}
};
- EditBox centerX
+ EditBox centerX
{
parent = this, text = "X", size = Size { 166, 19 }, position = Point { 16, 192 };
return true;
}
};
- EditBox centerY
+ EditBox centerY
{
parent = this, text = "Y", size = Size { 166, 19 }, position = Point { 16, 240 };
return true;
}
};
- EditBox rangeEdit
+ EditBox rangeEdit
{
parent = this, text = "Range", size = Size { 166, 19 }, position = Point { 16, 296 };
return true;
}
};
- Button reset
+ Button reset
{
parent = this, text = "Reset", size = Size { 170, 21 }, position = Point { 16, 328 };
if(fractal)
{
position = Max(position, 1);
- fractal.thread.loop = position;
+ fractal.thread.loop = position;
fractal.thread.numScales = numColors / position;
loopEdit.Clear();
bool NotifyModified(EditBox editBox)
{
- float value = atof(editBox.contents);
+ float value = (float)strtod(editBox.contents, null);
//if(value != maxLoop.thumbPosition)
{
//thumbPosition = value;
text = "Julia Parameters";
size = Size { 206, 610 };
- EditBox juliaX
+ EditBox juliaX
{
parent = this, text = "Xj", size = Size { 166, 19 }, position = Point { 16, 504 };
return true;
}
};
- EditBox juliaY
+ EditBox juliaY
{
parent = this, text = "Yj", size = Size { 166, 19 }, position = Point { 16, 552 };
MenuItem saveItemAsData
{
fileMenu, "Save As (with data)...";
-
+
bool NotifySelect(MenuItem selection, Modifiers mods)
{
return MenuFileSaveAs(selection, mods);
master = this, type = save, text = "Save Fractals Settings...",
types = fractalTypes, sizeTypes = sizeof(fractalTypes), filters = fractalFilters, sizeFilters = sizeof(fractalFilters)
};
-
+
FileDialog openDialog
{
master = this, type = open, text = "Load Fractals Settings...",
bool saveASCII;
saveDialog = mySaveDialog;
-
+
bool OnSaveFile(char * fileName)
{
File f = FileOpen(fileName, write);
f.Printf("%d\n", julia.thread.doLoop);
}
delete f;
- }
+ }
return true;
}
if(app.argc > 1)
LoadFractals(app.argv[1]);
mandelbrot.Activate();
+
+ julia.Render(true);
+ mandelbrot.Render(true);
return true;
}
}