Diff for /parser3/src/classes/image.C between versions 1.85 and 1.87

version 1.85, 2002/11/28 08:38:14 version 1.87, 2002/11/28 12:23:39
Line 924  public: Line 924  public:
                         return spacebarspace;                          return spacebarspace;
                 int tr=ifont.GetTransparent();                  int tr=ifont.GetTransparent();
                 for(int x=ifont.SX()-1; x>=0; x--) {                  for(int x=ifont.SX()-1; x>=0; x--) {
                         for(int y=0; y<height-1; y++)                          for(int y=0; y<height; y++)
                                 if(ifont.GetPixel(x, Y(y))!=tr)                                   if(ifont.GetPixel(x, Y(y))!=tr) 
                                         return x+1;                                          return x+1;
                 }                  }
Line 938  public: Line 938  public:
                   
         /* ******************************** string ********************************** */          /* ******************************** string ********************************** */
                   
           int step_width(int index) {
                   return letter_spacing + (monospace ? monospace : index_width(index));
           }
   
           // counts trailing letter_spacing, consider this OK. useful for contiuations
         int string_width(const String& s){          int string_width(const String& s){
                 const char *cstr=s.cstr();                  const char *cstr=s.cstr();
                 int result=0;                  int result=0;
                 for(; *cstr; cstr++)                  for(; *cstr; cstr++)
                         result+=index_width(index_of(*cstr));                          result+=step_width(index_of(*cstr));
                 return result;                  return result;
         }          }
                   
Line 951  public: Line 956  public:
                 if(cstr) for(; *cstr; cstr++) {                  if(cstr) for(; *cstr; cstr++) {
                         int index=index_of(*cstr);                          int index=index_of(*cstr);
                         index_display(image, x, y, index);                          index_display(image, x, y, index);
                         x+=letter_spacing + (monospace ? monospace : index_width(index));                          x+=step_width(index);
                 }                  }
         }          }
                   

Removed from v.1.85  
changed lines
  Added in v.1.87


E-mail: