//============================================================== void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) { Tinstance *in; in=(Tinstance*)instance; ExceptionInfo *exception; /* Generamos la excepción */ exception = AcquireExceptionInfo(); /* Transformamos el mapa de imagen de entrada para imagemagick */ Image *im = ConstituteImage(in->size.width, in->size.height, "RGBA", CharPixel, inframe, exception); if (in->preview) { minify(&im, (int)in->preview, exception); } /* Generamos la imagen de salida */ Image *out = MotionBlurImage(im, in->radius, in->deviation, in->angle, exception); if (in->preview) { magnify(&out, (int)in->preview, exception); } /* Volvemos a coger el contenido de la imagen para frei0r */ ExportImagePixels(out, 0, 0, in->size.width, in->size.height, "RGBA", CharPixel, outframe, exception); /* Liberamos memoria */ exception = DestroyExceptionInfo(exception); im = DestroyImage(im); out = DestroyImage(out); }
void DrawView::doZoomOut() { QPoint center; center.setX( old_size_x / 2 ); center.setY( old_size_y / 2 ); magnify( center, zoom_out ); }
void DrawView::mousePressEvent( QMouseEvent *e ) { int this_button; this_button = e->button() & MouseButtonMask; if ( my_button == NoButton ) { switch ( this_button ) { case LeftButton: point_1 = point_2 = e->pos(); my_button = my_button | LeftButton; break; case MidButton: magnify( e->pos(), zoom_in ); break; default: magnify( e->pos(), zoom_out ); break; } } }
float4 __CGsampler1DARRAY_state::sample(float4 strq, float lod) { lod += clampedLodBias; if (lod < minLod) { lod = minLod; } else if (lod > maxLod) { lod = maxLod; } else { // lod not clamped. } if (lod <= magnifyTransition) { return magnify(0, strq); } else { return minify(0, strq, lod); } }
picture magnify (picture pic, double sx, double sy) { raster<true_color> ras= as_raster<true_color> (pic); return raster_picture (magnify (ras, sx, sy)); }