Diff for /parser3/src/classes/image.C between versions 1.69 and 1.71

version 1.69, 2002/04/10 09:53:14 version 1.71, 2002/04/18 10:50:59
Line 25 Line 25
 #include "pa_vfile.h"  #include "pa_vfile.h"
 #include "pa_vimage.h"  #include "pa_vimage.h"
   
 // defines  
   
 #define IMAGE_CLASS_NAME "image"  
   
 // class  // class
   
 class MImage : public Methoded {  class MImage : public Methoded {
Line 316  static void _html(Request& r, const Stri Line 312  static void _html(Request& r, const Stri
         if(params->size()) {          if(params->size()) {
                 // for backward compatibility: someday was ^html{}                  // for backward compatibility: someday was ^html{}
                 Value &vattribs=r.process_to_value(params->get(0),                  Value &vattribs=r.process_to_value(params->get(0),
                         0/*no name*/,                          /*0/*no name* /,*/
                         false/*don't intercept string*/);                          false/*don't intercept string*/);
                 if(vattribs.is_defined()) // allow 'void'                  if(vattribs.is_defined()) // allow 'void'
                         if(attribs=vattribs.get_hash(&method_name)) {                          if(attribs=vattribs.get_hash(&method_name)) {
Line 693  static void _length(Request& r, const St Line 689  static void _length(Request& r, const St
         VImage& vimage=*static_cast<VImage *>(r.self);          VImage& vimage=*static_cast<VImage *>(r.self);
         if(vimage.image)          if(vimage.image)
                 if(vimage.font) {                  if(vimage.font) {
                         VInt& result=*new(pool) VInt(pool, vimage.font->string_width(s));                          r.write_no_lang(*new(pool) VInt(pool, vimage.font->string_width(s)));
                         result.set_name(method_name);  
                         r.write_assign_lang(result);  
                 } else                  } else
                         throw Exception("parser.runtime",                          throw Exception("parser.runtime",
                                 &method_name,                                  &method_name,
Line 814  static void _copy(Request& r, const Stri Line 808  static void _copy(Request& r, const Stri
   
 // constructor  // constructor
   
 MImage::MImage(Pool& apool) : Methoded(apool) {  MImage::MImage(Pool& apool) : Methoded(apool, "image") {
         set_name(*NEW String(pool(), IMAGE_CLASS_NAME));  
   
   
         // ^image:measure[DATA]          // ^image:measure[DATA]
         add_native_method("measure", Method::CT_DYNAMIC, _measure, 1, 1);          add_native_method("measure", Method::CT_DYNAMIC, _measure, 1, 1);
   

Removed from v.1.69  
changed lines
  Added in v.1.71


E-mail: