Browse Source

finaly works on mac

master
Joshua Moerman 15 years ago
parent
commit
69ce3665c6
  1. 14
      Canvas.cpp
  2. 2
      defines.hpp

14
Canvas.cpp

@ -6,7 +6,7 @@
//#include <cstdint> //#include <cstdint>
using namespace std; using namespace std;
//#include "pngwriter/pngwriter.h" #include "pngwriter/pngwriter.h"
#include "Canvas.hpp" #include "Canvas.hpp"
@ -148,9 +148,9 @@ void Canvas::output_file(const char * filename){
power[i] = vibrancy*power[i] + (1.0 - vibrancy)*averagePower; power[i] = vibrancy*power[i] + (1.0 - vibrancy)*averagePower;
} }
//pngwriter * pngFile = new pngwriter(width, height, 0.0, filename); pngwriter * pngFile = new pngwriter(width, height, 0.0, filename);
//pngFile->setcompressionlevel(9); pngFile->setcompressionlevel(9);
//pngFile->settext("Attractor", "Joshua Moerman", "A awesome attractor", "AwesomeAttractor"); pngFile->settext("Attractor", "Joshua Moerman", "A awesome attractor", "AwesomeAttractor");
for ( unsigned int x = 0; x < width; x++ ) { for ( unsigned int x = 0; x < width; x++ ) {
for ( unsigned int y = 0; y < height; y++ ) { for ( unsigned int y = 0; y < height; y++ ) {
@ -177,7 +177,7 @@ void Canvas::output_file(const char * filename){
} }
} }
//pngwriter clips values for me //pngwriter clips values for me
//pngFile->plot(x, y, r, g, b); pngFile->plot(x, y, r, g, b);
} }
} }
@ -185,7 +185,7 @@ void Canvas::output_file(const char * filename){
delete max_int; delete max_int;
delete power; delete power;
cout << "ready for writing file i suppose" << endl; cout << "ready for writing file i suppose: " << filename << endl;
ofstream file(filename); ofstream file(filename);
if ( !file ) { if ( !file ) {
@ -194,7 +194,7 @@ void Canvas::output_file(const char * filename){
cout << filename << endl; cout << filename << endl;
//pngFile->close(); pngFile->close();
} }

2
defines.hpp

@ -11,5 +11,5 @@
#else #else
#define WIDTH 800 #define WIDTH 800
#define HEIGHT 800 #define HEIGHT 800
#define ITERATIONS 20000000 #define ITERATIONS 20000
#endif #endif