pike.git / lib / modules / _Image_DWG.pmod

version» Context lines:

pike.git/lib/modules/_Image_DWG.pmod:1:   // AutoCAD R13/R14/R2000 DWG file decoder - // $Id: _Image_DWG.pmod,v 1.4 2004/03/01 22:28:23 nilsson Exp $ + // $Id: _Image_DWG.pmod,v 1.5 2008/06/28 16:36:53 nilsson Exp $      #pike __REAL_VERSION__      //! @appears Image.DWG   //! This module decodes the thumbnail raster images embedded in   //! AutoCAD DWG files for AutoCAD version R13, R14 and R2000 (which   //! equals to file version 12, 14 and 15). Implemented according to   //! specifications from @url{http://www.opendwg.org/@}.    - static constant start = "\x1F\x25\x6D\x07\xD4\x36\x28\x28\x9D\x57\xCA\x3F\x9D\x44\x10\x2B"; + protected constant start = "\x1F\x25\x6D\x07\xD4\x36\x28\x28\x9D\x57\xCA\x3F\x9D\x44\x10\x2B";    - static inline int read_RL(string data, int pos) { + protected inline int read_RL(string data, int pos) {    int r;    sscanf(data[pos..pos+3], "%-4c", r);    return r;   }      //! Decodes the DWG @[data] into a mapping.   //! @mapping   //! @member int "version"   //! The version of the DWG file. One of 12, 14 and 15.   //! @member array(string) "bmp"
pike.git/lib/modules/_Image_DWG.pmod:90:    default:    error("Error while decoding DWG preview. (Unknown code %d)\n", code);    }    }       return ([ "version" : version,    "bmp" : bmps,    "wmf" : wmfs ]);   }    - static Image.Image get_first_image( mapping data ) { + protected Image.Image get_first_image( mapping data ) {    if( !sizeof(data->bmp) )    error("No bitmap previews available.\n");    foreach(data->bmp, string bmp) {    catch {    return Image.BMP.decode(bmp);    };    }    error("Failed to decode any of the previews.\n");   }