|
|
| version 1.95, 2003/11/03 11:22:06 | version 1.99, 2003/11/20 16:34:23 |
|---|---|
| Line 5 | Line 5 |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| static const char* IDENT_IMAGE_C="$Date$"; | static const char * const IDENT_IMAGE_C="$Date$"; |
| /* | /* |
| jpegsize: gets the width and height (in pixels) of a jpeg file | jpegsize: gets the width and height (in pixels) of a jpeg file |
| Line 33 static const char* IDENT_IMAGE_C="$Date$ | Line 33 static const char* IDENT_IMAGE_C="$Date$ |
| class MImage: public Methoded { | class MImage: public Methoded { |
| public: // VStateless_class | public: // VStateless_class |
| Value* create_new_value() { return new VImage(); } | Value* create_new_value(Pool&) { return new VImage(); } |
| public: | public: |
| MImage(); | MImage(); |
| Line 687 struct File_measure_action_info { | Line 687 struct File_measure_action_info { |
| }; | }; |
| #endif | #endif |
| static void file_measure_action( | static void file_measure_action( |
| struct stat& finfo, int f, | struct stat& /*finfo*/, int f, |
| const String& file_spec, const char* fname, bool as_text, | const String& /*file_spec*/, const char* fname, bool /*as_text*/, |
| void *context) { | void *context) { |
| File_measure_action_info& info=*static_cast<File_measure_action_info *>(context); | File_measure_action_info& info=*static_cast<File_measure_action_info *>(context); |
| Line 792 static gdImage* load(Request& r, | Line 792 static gdImage* load(Request& r, |
| throw Exception("file.missing", | throw Exception("file.missing", |
| 0, | 0, |
| "can not open '%s'", file_name_cstr); | "can not open '%s'", file_name_cstr); |
| return 0; | |
| } | } |
| } | } |
| Line 805 static void _load(Request& r, MethodPara | Line 804 static void _load(Request& r, MethodPara |
| } | } |
| static void _create(Request& r, MethodParams& params) { | static void _create(Request& r, MethodParams& params) { |
| int width=params.as_int(0, "width must be int", r); | int width=params.as_int(0, "width must be int", r); |
| int height=params.as_int(1, "height must be int", r); | int height=params.as_int(1, "height must be int", r); |
| int bgcolor_value=0xffFFff; | int bgcolor_value=0xffFFff; |
| Line 818 static void _create(Request& r, MethodPa | Line 816 static void _create(Request& r, MethodPa |
| } | } |
| static void _gif(Request& r, MethodParams& params) { | static void _gif(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 842 static void _gif(Request& r, MethodParam | Line 839 static void _gif(Request& r, MethodParam |
| } | } |
| static void _line(Request& r, MethodParams& params) { | static void _line(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 858 static void _line(Request& r, MethodPara | Line 854 static void _line(Request& r, MethodPara |
| } | } |
| static void _fill(Request& r, MethodParams& params) { | static void _fill(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 872 static void _fill(Request& r, MethodPara | Line 867 static void _fill(Request& r, MethodPara |
| } | } |
| static void _rectangle(Request& r, MethodParams& params) { | static void _rectangle(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 888 static void _rectangle(Request& r, Metho | Line 882 static void _rectangle(Request& r, Metho |
| } | } |
| static void _bar(Request& r, MethodParams& params) { | static void _bar(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 912 static void add_point(Table::element_typ | Line 905 static void add_point(Table::element_typ |
| } | } |
| #endif | #endif |
| static void _replace(Request& r, MethodParams& params) { | static void _replace(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 934 static void _replace(Request& r, MethodP | Line 926 static void _replace(Request& r, MethodP |
| } | } |
| static void _polyline(Request& r, MethodParams& params) { | static void _polyline(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 956 static void _polyline(Request& r, Method | Line 947 static void _polyline(Request& r, Method |
| } | } |
| static void _polygon(Request& r, MethodParams& params) { | static void _polygon(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |
| Line 977 static void _polygon(Request& r, MethodP | Line 967 static void _polygon(Request& r, MethodP |
| } | } |
| static void _polybar(Request& r, MethodParams& params) { | static void _polybar(Request& r, MethodParams& params) { |
| gdImage* image=GET_SELF(r, VImage).image; | gdImage* image=GET_SELF(r, VImage).image; |
| if(!image) | if(!image) |
| throw Exception(0, | throw Exception(0, |