gimpoperationcagepreview: transform only pixel inside the cage

This commit is contained in:
Michael Muré 2010-08-14 23:53:23 +02:00
parent b7c2b26def
commit 02a14315f4
1 changed files with 28 additions and 26 deletions

View File

@ -206,6 +206,8 @@ gimp_operation_cage_preview_process (GeglOperation *operation,
gfloat *coef = it->data[coef_index]; gfloat *coef = it->data[coef_index];
while(n_pixels--) while(n_pixels--)
{
if (gimp_cage_config_point_inside(config, x, y))
{ {
/* computing of the final position of the source pixel */ /* computing of the final position of the source pixel */
gdouble pos_x, pos_y; gdouble pos_x, pos_y;
@ -213,7 +215,6 @@ gimp_operation_cage_preview_process (GeglOperation *operation,
pos_x = 0; pos_x = 0;
pos_y = 0; pos_y = 0;
for(i = 0; i < cvn; i++) for(i = 0; i < cvn; i++)
{ {
pos_x += coef[i] * config->cage_vertices_d[i].x; pos_x += coef[i] * config->cage_vertices_d[i].x;
@ -235,6 +236,7 @@ gimp_operation_cage_preview_process (GeglOperation *operation,
format_io, format_io,
source, source,
GEGL_AUTO_ROWSTRIDE); GEGL_AUTO_ROWSTRIDE);
}
source += 4; source += 4;
coef += 2 * cvn; coef += 2 * cvn;