|
|
| version 1.60, 2001/10/29 13:04:45 | version 1.63, 2001/12/17 14:02:44 |
|---|---|
| Line 1 | Line 1 |
| 123 | |
| /** @file | /** @file |
| Parser: @b image parser class. | Parser: @b image parser class. |
| Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) | Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru>(http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru>(http://paf.design.ru) |
| $Id$ | $Id$ |
| */ | */ |
| Line 397 static void _gif(Request& r, const Strin | Line 398 static void _gif(Request& r, const Strin |
| VFile& vfile=*new(pool) VFile(pool); | VFile& vfile=*new(pool) VFile(pool); |
| Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif")); | Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif")); |
| vfile.set(false/*not tainted*/, | vfile.set(false/*not tainted*/, |
| out.cstr(String::UL_AS_IS), out.size(), 0, content_type); | out.cstr(), out.size(), 0, content_type); |
| r.write_no_lang(vfile); | r.write_no_lang(vfile); |
| } | } |
| Line 618 public: | Line 619 public: |
| /* ******************************** string ********************************** */ | /* ******************************** string ********************************** */ |
| int string_width(const String& s){ | int string_width(const String& s){ |
| const char *cstr=s.cstr(String::UL_AS_IS); | const char *cstr=s.cstr(); |
| int result=0; | int result=0; |
| for(; *cstr; cstr++) | for(; *cstr; cstr++) |
| result+=index_width(index_of(*cstr)); | result+=index_width(index_of(*cstr)); |
| Line 626 public: | Line 627 public: |
| } | } |
| void string_display(gdImage& image, int x, int y, const String& s){ | void string_display(gdImage& image, int x, int y, const String& s){ |
| const char *cstr=s.cstr(String::UL_AS_IS); | const char *cstr=s.cstr(); |
| 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); |