pike.git / lib / modules / _Image_PSD.pmod

version» Context lines:

pike.git/lib/modules/_Image_PSD.pmod:261:    {    lopts->image = img;    if( alpha )    lopts->alpha = alpha;    else    lopts->alpha = 0;   // lopts->alpha_value = 1.0;    }    }    array layers; +  Image.Layer lay;    if( lopts->image ) -  layers = ({ Image.Layer( lopts ) }); +  { +  layers = ({ (lay = Image.Layer( lopts )) }); +  lay->set_misc_value( "visible", 1 ); +  lay->set_misc_value( "name", "Background" ); +  lay->set_misc_value( "image_guides", what->resources->guides ); +  }    else    layers = ({});       foreach(reverse(what->layers), object l)    {    string m = translate_mode( l->mode );    if( m &&    ((!(l->flags & LAYER_FLAG_INVISIBLE) && l->opacity)    || opts->draw_all_layers ))    { -  Image.Layer lay = Image.Layer( l->image, l->alpha, m ); +  lay = Image.Layer( l->image, l->alpha, m );    l->image = 0; l->alpha = 0;    lay->set_misc_value( "visible", !(l->flags & LAYER_FLAG_INVISIBLE) );    lay->set_misc_value( "name", l->name ); -  +  lay->set_misc_value( "image_guides", what->resources->guides );    if( lay->alpha() )    lay->set_image( lay->image(), lay->alpha()->color(l->opacity,    l->opacity,    l->opacity ) );    else    lay->set_image( lay->image(),    lay->image()->clear(l->opacity,    l->opacity,    l->opacity) );    lay->set_offset( l->xoffset, l->yoffset );