X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2Ftest%2Fpen.cpp;h=8b1a5553bba3611708beb71bba67d998816c15f8;hb=cee5940bae97612105db8b7e1ffcf513f9d9150c;hp=d89af0d3da157dd68bbb4f1e059650c981c7578b;hpb=dee84efa006428fdfbf0e84b66ee94eb23113ad9;p=synfig.git diff --git a/ETL/trunk/test/pen.cpp b/ETL/trunk/test/pen.cpp index d89af0d..8b1a555 100644 --- a/ETL/trunk/test/pen.cpp +++ b/ETL/trunk/test/pen.cpp @@ -115,7 +115,7 @@ int generic_pen_test(int w, int h) printf("FAILURE! "__FILE__"@%d: iterator_x inconsistancy\n",__LINE__); return 1; } - + printf("PASSED\n"); return 0; @@ -260,18 +260,18 @@ int box_blur_test(void) // Pen 2 will be the end pen2=pen; pen2.move(w,h); - + //temporary vbox_blur(pen,pen2,2,pen3); printf("\n VBLUR ONLY:\n"); display_pen(pen3,w,h); - + // box_blur(pen,w,h,4); hbox_blur(pen,pen2,2,pen3); - + printf("\n HBLUR ONLY:\n"); display_pen(pen3,w,h); - + pen2=pen3; pen2.move(w,h); vbox_blur(pen3,pen2,2,pen); @@ -286,7 +286,7 @@ int box_blur_test(void) printf("FAILURE! "__FILE__"@%d: blur result contained %d bad values\n",__LINE__,bad_values); return 1; } - + boxblur_float max=0; printf("CHECK BOXBLUR RESULTS %d,%d:\n",pen.diff_begin().x, pen.diff_begin().y); for(y=0;y= h) iy = h-1; - + for(int ox=-2; ox <= 2; ++ox) { int ix = x+ox; if(ix < 0) ix = 0; if(ix >= w) ix = w-1; - + if(ix-iy<=1 && iy-ix<=1 || iy==h/2 || ix==w/2) f += 2; } } - + //print out if the relative error is high /*f /= 25; float rf = pen.get_value() - f/25; @@ -326,7 +326,7 @@ int box_blur_test(void) pen.dec_x(x); } pen.dec_y(y); - + /*if(max) { for(y=0;y