Roxen.git / server / modules / graphics / cimg.pike

version» Context lines:

Roxen.git/server/modules/graphics/cimg.pike:237:      void create()   {    defvar("ext", Variable.Flag(0, VAR_MORE,    "Append format to generated images",    "Append the image format (.gif, .png, "    ".jpg, etc) to the generated images. "    "This is not necessary, but might seem "    "nicer, especially to people who try "    "to mirror your site.")); +  defvar ("default_args", +  Variable.Mapping (([]), 0, +  "Default Arguments", +  "Arguments to add implicitly to cimg/cimg-url/" +  "emit#cimg calls. Explicit arguments will take " +  "precedence over any arguments specified here."));   }      void start()   {    // Reuse previous cache object if possible    if (the_cache) {    // Update reference to callback function in case we've been reloaded    the_cache->set_draw_function(generate_image);    } else {    the_cache = roxen.ImageCache( "cimg", generate_image );
Roxen.git/server/modules/graphics/cimg.pike:425:    foreach( glob( "*-*", indices(args)), string n ) {    if (!has_prefix(n, "data-"))    a[n] = args[n];    }       return a;   }      mapping check_args( mapping args )   { +  args = query ("default_args") + args;    if( !args->format )    args->format = "png";    if( !(args->src || args->data) )    RXML.parse_error("Required attribute 'src' or 'data' missing\n");    if (args->src == "")    RXML.parse_error("Attribute 'src' cannot be empty\n");    if( args->src && args->data )    RXML.parse_error("Only one of 'src' and 'data' may be specified\n");       return args;