From 419d5533423ca402ffce44e2e2a05d62c5ba1804 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 8 Jan 2010 18:23:30 +0100 Subject: Circle peaks in hdfsee --- src/render.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/render.c') diff --git a/src/render.c b/src/render.c index ce44610c..bd5d25a6 100644 --- a/src/render.c +++ b/src/render.c @@ -101,6 +101,7 @@ static void show_marked_features(struct image *image, guchar *data, struct imagefeature *f; int x, y; + double th; f = image_get_feature(image->features, i); @@ -109,7 +110,21 @@ static void show_marked_features(struct image *image, guchar *data, x /= binning; y /= binning; - data[3*( x+w*(h-1-y) )+0] = 255; + for ( th=0; th<2*M_PI; th+=M_PI/40.0 ) { + + int nx, ny; + + nx = x + 10.0*cos(th); + ny = y + 10.0*sin(th); + + if ( nx < 0 ) continue; + if ( ny < 0 ) continue; + if ( nx >= w ) continue; + if ( ny >= h ) continue; + + data[3*( nx+w*(h-1-ny) )+0] = 255; + + } } } -- cgit v1.2.3